jQuery 1.5.1 Unique Traversal (v9)

Revision 9 of this benchmark created on


Description

See: http://bugs.jquery.com/ticket/7964

Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5/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>

Test runner

Ready to run.

Testing in
TestOps/sec
.children() - jQuery 1.4.4
aa.children();
ready
.children() - jQuery 1.5.1
bb.children();
ready
.next() - jQuery 1.4.4
aa.next();
ready
.next() - jQuery 1.5.1
bb.next();
ready
.prev() - jQuery 1.4.4
aa.prev();
ready
.prev() - jQuery 1.5.1
bb.prev();
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.