jQuery 1.9.1 vs. 2.0.0 beta 2

JavaScript performance comparison

Revision 18 of this test case created

Preparation code

<script src="//code.jquery.com/jquery-1.9.1.min.js">
</script>
<script>
  var jQ19 = jQuery.noConflict();
</script>
<script src="//code.jquery.com/jquery-2.0.0b2.js">
</script>
<script>
  var jQ20b = 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>

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
1.9.1 ID Selector
jQ19("#idSelector");
pending…
2.0.0b ID Selector
jQ20b("#idSelector");
pending…
1.9.1 Class Selector
jQ19(".classSelector");
pending…
2.0.0b Class Selector
jQ20b(".classSelector");
pending…
1.9.0 Iteration
jQ19("#iteration li").each(function(i, e) {
  i++;
});
pending…
2.0.0b Iteration
jQ20b("#iteration li").each(function(i, e) {
  i++;
});
pending…
2.0.0b Non-existent ID
jQ20b("#someID");
pending…
1.9.0 Non-existent Class
jQ19(".someClass");
pending…
2.0.0b Non-existent Class
jQ20b(".someClass");
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:

0 comments

Add a comment