jQuery 1.4.2 vs. jQuery 1.9.1

JavaScript performance comparison

Revision 34 of this test case created

Preparation code

<script src="http://code.jquery.com/jquery-1.4.2.min.js">
</script>
<script type="text/javascript">
  var jQ14 = jQuery.noConflict();
</script>
<script src="http://code.jquery.com/jquery-1.9.1.min.js">
</script>
<script type="text/javascript">
  var jQ19 = 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.4.2 ID Selector
jQ14("#idSelector");
pending…
1.9 ID Selector
jQ19("#idSelector");
pending…
1.4.2 Class Selector
jQ14(".classSelector");
pending…
1.9 Class Selector
jQ19(".classSelector");
pending…
1.4.2 Iteration
jQ14("#iteration li").each(function(i, e) {

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

});
pending…
1.5.2 CSS Getter
jQ14("#cssGetter").css("color");
pending…
1.9 CSS Getter
jQ19("#cssGetter").css("color");
pending…
1.4.2 CSS Setter
jQ14("#cssSetter").css("color", "red");
pending…
1.9 CSS Setter
jQ19("#cssSetter").css("color", "red");
pending…
1.4.2 Find
jQ14("#find").find("strong");
pending…
1.9 Find
jQ19("#find").find("strong");
pending…
1.4.2 Hierarchy selector
jQ14("#iteration > li");
pending…
1.9.1 Hierarchy selector
jQ19("#iteration > li");
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