jQuery 1.6.0 vs. jQuery 1.8.1 (v5)

Revision 5 of this benchmark created on


Preparation HTML

<script src="http://code.jquery.com/jquery-1.6.min.js">
</script>
<script>
  var jQ16 = jQuery.noConflict();
</script>
<script src="http://code.jquery.com/jquery-1.8.1.min.js">
</script>
<script>
  var jQ18 = jQuery.noConflict();
</script>
<div id="idSelector">
</div>
<div class="classSelector">
</div>
<ul id="iteration">
  <li>
  </li>
  <li>
  </li>
  <li>
  </li>
  <li>
  </li>
  <li>
  </li>
  <li>
  </li>
  <li>
  </li>
</ul>
<div id="cssGetter" style="color: black;">
</div>
<div id="cssSetter" style="color: black;">
</div>
<div id="find">
  <span>
  </span>
  <div>
    <strong>
    </strong>
  </div>
</div>

Test runner

Ready to run.

Testing in
TestOps/sec
1.6.0 ID Selector
jQ16("#idSelector");
ready
1.8 ID Selector
jQ18("#idSelector");
ready
1.6.0 Class Selector
jQ16(".classSelector");
ready
1.8 Class Selector
jQ18(".classSelector");
ready
1.6.0 Iteration
jQ16("#iteration li").each(function(i, e) {

});
ready
1.8 Iteration
jQ18("#iteration li").each(function(i, e) {

});
ready
1.6.0 CSS Getter
jQ16("#cssGetter").css("color");
ready
1.8 CSS Getter
jQ18("#cssGetter").css("color");
ready
1.6.0 CSS Setter
jQ16("#cssSetter").css("color", "red");
ready
1.8 CSS Setter
jQ18("#cssSetter").css("color", "red");
ready
1.6.0 Find
jQ16("#find").find("strong");
ready
1.8 Find
jQ18("#find").find("strong");
ready

Revisions

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