jQuery 1.5.1 Unique Traversal
JavaScript performance comparison
Info
Preparation code
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script>var a = jQuery.noConflict(), aa;</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script>var b = jQuery.noConflict(), bb;</script>
<div id="tests" style="display:none;"></div>
<script>
var i, j, ac = 0,
bc = 0,
html = "";
for (j = 0; j < 20; j++) {
html += "<div class='jq144'>";
for (i = 0; i < 5; i++) {
html += "<div>abcdefghijklmnopqrstuvwxyz</div><div>0123456789</div>";
}
html += "</div>";
}
for (j = 0; j < 20; j++) {
html += "<div class='jq150'>";
for (i = 0; i < 5; i++) {
html += "<div>abcdefghijklmnopqrstuvwxyz</div><div>0123456789</div>";
}
html += "</div>";
}
document.getElementById("tests").innerHTML = html;
aa = a(".jq144");
bb = b(".jq150");
</script>
Preparation code output
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
.children() - jQuery 1.4.4 |
|
pending… |
.children() - jQuery 1.5.1 |
|
pending… |
.next() - jQuery 1.4.4 |
|
pending… |
.next() - jQuery 1.5.1 |
|
pending… |
.prev() - jQuery 1.4.4 |
|
pending… |
.prev() - jQuery 1.5.1 |
|
pending… |
Compare results of other browsers
Revisions
You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:
- Revision 1: published by John Resig
- Revision 8: published
- Revision 9: published
- Revision 10: published
- Revision 11: published
- Revision 12: published
- Revision 13: published
- Revision 15: published
- Revision 16: published by Rahly
0 comments