jQuery 1.9.1 vs 1.10.1 vs 2.1.0 comparisons

JavaScript performance comparison

Revision 54 of this test case created by

Preparation code

<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js"></script>
<script>
var $191 = jQuery.noConflict();
</script>


<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.10.1.min.js"></script>
<script>
var $1101 = jQuery.noConflict();
</script>

<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.0.min.js"></script>
<script>
var $210 = jQuery.noConflict();
</script>


<div class="wrapper">
     <div class="innerWrapper">
          <div class="button">
               <a href="" id="button" class="buttonRef">
                    <span class="buttonText">Text</span>
               </a>
          </div>
     </div>
</div>
<script>
  var context191 = $191("div.wrapper");
  var context1101 = $1101("div.wrapper");
  var context210 = $210("div.wrapper");
</script>
    

Preparation code output

<div class="wrapper"> <div class="innerWrapper"> <div class="button"> <a href="" id="button" class="buttonRef"> <span class="buttonText">Text</span> </a> </div> </div> </div>

Test runner

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

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
Get - Class 1.9.1
var item = $191(".buttonRef");
pending…
Get - Class 1.10.1
var item = $1101(".buttonRef");
pending…
Get - Class 2.1.0
var item = $210(".buttonRef");
pending…
Context - Class 1.9.1
var item = $191(".buttonRef", context191);
pending…
Context - Class 1.10.1
var item = $1101(".buttonRef", context1101);
pending…
Context - Class 2.1.0
var item = $210(".buttonRef", context210);
pending…
Find - Class 1.9.1
var item = context191.find(".buttonRef")
pending…
Find - Class 1.10.1
var item = context1101.find(".buttonRef")
pending…
Find - Class 2.1.0
var item = context210.find(".buttonRef")
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.

0 Comments