jQuery 1.4.4 vs 1.8.3 vs 1.11.1 vs 1.6.4 vs 2.1.1 comparisons

JavaScript performance comparison

Revision 55 of this test case created by

Preparation code

<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script>
var $211 = jQuery.noConflict();
</script>

<script src="https://code.jquery.com/jquery-1.8.3.min.js"></script>
<script>
var $183 = jQuery.noConflict();
</script>

<style type="text/css">
    .content {
        padding: 0px 10px;
        margin: 0px 5px;
        border: 1px solid orange;
    }
</style>

<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 context83 = $183("div.wrapper");
  var context211 = $211("div.wrapper");
</script>
    

Preparation code output

<style type="text/css"> .content { padding: 0px 10px; margin: 0px 5px; border: 1px solid orange; } </style> <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
outerWidth - Class 2.1.1
outerWidth = $211(".content").outerWidth(true);
pending…
Find - Class 2.1.1
var item = context211.find(".buttonRef")
pending…
Get - Class 2.1.1
var item = $211(".buttonRef");
pending…
Context - Class 2.1.1
var item = $211(".buttonRef", context211);
pending…
outerWidth - Class 1.6.4
outerWidth = $164(".content").outerWidth(true);
pending…
Context - Class 1.6.4
var item = $164(".buttonRef", context64);
pending…
Find - Class 1.6.4
var item = context64.find(".buttonRef")
pending…
Get - Class 1.6.4
var item = $164(".buttonRef");
pending…
outerWidth - Class 1.11.1
outerWidth = $1111(".content").outerWidth(true);
pending…
outerWidth - Clas 1.4.4
outerWidth = $144(".content").outerWidth(true);
pending…
outerWidth - Class 1.8.3
outerWidth = $183(".content").outerWidth(true);
pending…
Find - Class 1.11.1
var item = context111.find(".buttonRef")
pending…
Find - Class 1.8.3
var item = context83.find(".buttonRef")
pending…
Find - Class 1.4.4
var item = context44.find(".buttonRef")
pending…
Context - Class 1.11.1
var item = $1111(".buttonRef", context111);
pending…
Context - Class 1.8.3
var item = $183(".buttonRef", context83);
pending…
Get - Class 1.11.1
var item = $1111(".buttonRef");
pending…
Context - Class 1.4.4
var item = $144(".buttonRef", context44);
pending…
Get - Class 1.8.3
var item = $183(".buttonRef");
pending…
Get - Class 1.4.4
var item = $144(".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