jQuery 1.7.1 vs. jQuery 1.8.3 (v12)

Revision 12 of this benchmark created by disy-mk on


Preparation HTML

<script src="http://code.jquery.com/jquery-1.7.1.min.js">
</script>
<script>
  var jQ17 = jQuery.noConflict();
</script>
<script src="http://code.jquery.com/jquery-1.8.3.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.7.1 ID Selector
jQ17("#idSelector");
ready
1.8.3 ID Selector
jQ18("#idSelector");
ready
1.7.1 Class Selector
jQ17(".classSelector");
ready
1.8.3 Class Selector
jQ18(".classSelector");
ready
1.7.1 Iteration
jQ17("#iteration li").each(function(i, e) {

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

});
ready
1.7.1 CSS Getter
jQ17("#cssGetter").css("color");
ready
1.8.3 CSS Getter
jQ18("#cssGetter").css("color");
ready
1.7.1 CSS Setter
jQ17("#cssSetter").css("color", "red");
ready
1.8.3 CSS Setter
jQ18("#cssSetter").css("color", "red");
ready
1.7.1 Find
jQ17("#find").find("strong");
ready
1.8.3 Find
jQ18("#find").find("strong");
ready
1.7.1 Non-existent ID
jQ17("#someID");
ready
1.8.3 Non-existent ID
jQ18("#someID");
ready
1.7.1 Non-existent Class
jQ17(".someClass");
ready
1.8.3 Non-existent Class
jQ18(".someClass");
ready

Revisions

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