jQuery 1.7.2 vs. jQuery 1.8.2 vs jQuery 1.9b1 vs jQuery 2.0

JavaScript performance comparison

Revision 5 of this test case created

Preparation code

<script src="http://code.jquery.com/jquery-1.7.2.min.js">
</script>
<script type="text/javascript">
  var jQ17 = jQuery.noConflict();
</script>
<script src="http://code.jquery.com/jquery-1.8.2.min.js">
</script>
<script type="text/javascript">
  var jQ18 = jQuery.noConflict();
</script>
<script src="http://code.jquery.com/jquery-1.9.0.min.js">
</script>
<script type="text/javascript">
  var jQ19 = jQuery.noConflict();
</script>
<script src="http://code.jquery.com/jquery-2.0.0b1.js"></script>
<script type="text/javascript">
  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>

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
2.0 ID Selector
jQ20("#idSelector");
pending…
1.7.2 ID Selector
jQ17("#idSelector");
pending…
1.8.2 ID Selector
jQ18("#idSelector");
pending…
1.9.0 ID Selector
jQ19("#idSelector");
pending…
2.0 Class Selector
jQ20(".classSelector");
pending…
1.7.2 Class Selector
jQ17(".classSelector");
pending…
1.8.2 Class Selector
jQ18(".classSelector");
pending…
1.9.0 Class Selector
jQ19(".classSelector");
pending…
2.0 Iteration
jQ20("#iteration li").each(function(i, e) {});
pending…
1.7.2 Iteration
jQ17("#iteration li").each(function(i, e) {});
pending…
1.8.2 Iteration
jQ18("#iteration li").each(function(i, e) {});
pending…
1.9.0 Iteration
jQ19("#iteration li").each(function(i, e) {});
pending…
2.0 CSS Getter
jQ20("#cssGetter").css("color");
pending…
1.7.2 CSS Getter
jQ17("#cssGetter").css("color");
pending…
1.8.2 CSS Getter
jQ18("#cssGetter").css("color");
pending…
1.9.0 CSS Getter
jQ19("#cssGetter").css("color");
pending…
2.0 CSS Setter
jQ20("#cssSetter").css("color", "red");
pending…
1.7.2 CSS Setter
jQ17("#cssSetter").css("color", "red");
pending…
1.8.2 CSS Setter
jQ18("#cssSetter").css("color", "red");
pending…
1.9.0 CSS Setter
jQ19("#cssSetter").css("color", "red");
pending…
2.0 Find
jQ20("#find").find("strong");
pending…
1.7.2 Find
jQ17("#find").find("strong");
pending…
1.8.2 Find
jQ18("#find").find("strong");
pending…
1.9.0 Find
jQ19("#find").find("strong");
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