jQuery 1.7.2 vs. jQuery 1.8

JavaScript performance comparison

Revision 30 of this test case created by Firoz Khan Patan

Preparation code

<script src="http://code.jquery.com/jquery-1.5.2.min.js">
</script>
<script type="text/javascript">
  var jQ15 = jQuery.noConflict();
</script>
<script src="http://code.jquery.com/jquery-1.8.0.min.js">
</script>
<script type="text/javascript">
  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>

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.5.2 ID Selector
jQ15("#idSelector");
pending…
1.8 ID Selector
jQ18("#idSelector");
pending…
1.5.2 Class Selector
jQ15(".classSelector");
pending…
1.8 Class Selector
jQ18(".classSelector");
pending…
1.5.2 Iteration
jQ15("#iteration li").each(function(i, e) {

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

});
pending…
1.5.2 CSS Getter
jQ15("#cssGetter").css("color");
pending…
1.8 CSS Getter
jQ18("#cssGetter").css("color");
pending…
1.5.2 CSS Setter
jQ15("#cssSetter").css("color", "red");
pending…
1.8 CSS Setter
jQ18("#cssSetter").css("color", "red");
pending…
1.5.2 Find
jQ15("#find").find("strong");
pending…
1.8 Find
jQ18("#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