jQuery 2.0.3 vs 2.1.1 (v72)

Revision 72 of this benchmark created on


Preparation HTML

<script src="https://code.jquery.com/jquery-2.0.3.min.js">
</script>
<script>
  var jQ203 = jQuery.noConflict();
</script>
<script src="https://code.jquery.com/jquery-2.1.1.min.js">
</script>
<script>
  var jQ20 = 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
2.0.3 ID Selector
jQ203("#idSelector");
ready
2.x ID Selector
jQ20("#idSelector");
ready
2.0.3 Class Selector
jQ203(".classSelector");
ready
2.x Class Selector
jQ20(".classSelector");
ready
2.0.3 Iteration
jQ203("#iteration li").each(function(i, e) {
  i++;
});
ready
2.x Iteration
jQ20("#iteration li").each(function(i, e) {
  i++;
});
ready
2.0.3 CSS Getter
jQ203("#cssGetter").css("color");
ready
2.x CSS Getter
jQ20("#cssGetter").css("color");
ready
2.0.3 CSS Setter
jQ203("#cssSetter").css("color", "red");
ready
2.x CSS Setter
jQ20("#cssSetter").css("color", "red");
ready
2.0.3 Find
jQ203("#find").find("strong");
ready
2.x Find
jQ20("#find").find("strong");
ready
2.0.3 Non-existent ID
jQ203("#someID");
ready
2.x Non-existent ID
jQ20("#someID");
ready
2.0.3 Non-existent Class
jQ203(".someClass");
ready
2.x Non-existent Class
jQ20(".someClass");
ready
2.0.3 Filter-next-prev
jQ203("#iteration li").filter(":first").next();
jQ203("#iteration li").filter(":last").prev();
ready
2.x Filter-next-prev
jQ20("#iteration li").filter(":first").next();
jQ20("#iteration li").filter(":last").prev();
ready
2.0.3 .next-prev
jQ203("#iteration li").first().next();
jQ203("#iteration li").last().prev();
ready
2.x .next-prev
jQ20("#iteration li").first().next();
jQ20("#iteration li").last().prev();
ready

Revisions

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