jQuery tag rename alpha test
JavaScript performance comparison
Preparation code
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<h1>jQuery plugin test: Tag Renaming</h1>
<p>This is a paragraph.</p>
<p class="bold">This is a bold paragraph.</p>
<div id="bla2">
<h2>This is something else</h2>
<p id="bla" class="red">This is a red paragraph.</p>
</div>
<hr>
<a href="#" onclick="$('p').renameTag('h1');">Rename tags</a>
Preparation code output
jQuery plugin test: Tag Renaming
This is a paragraph.
This is a bold paragraph.
This is something else
This is a red paragraph.
Rename tags
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
single regexp object |
|
pending… |
separate regexp for opening and closing tag |
|
pending… |
simple replaceWith, no search |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments