Speed comparison of jQuery versions

JavaScript performance comparison

Test case created by

Preparation code

<div>
  <ul id="menu">
    <li class="menu-item">
    </li>
    <li class="menu-item">
    </li>
    <li class="menu-item">
    </li>
    <li class="menu-item">
    </li>
    <li class="menu-item">
    </li>
    <li class="menu-item">
    </li>
  </ul>
</div>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js">
</script>
<script>
  var $jq16 = $.noConflict(true);
</script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js">
</script>
<script>
  var $jq17 = $.noConflict(true);
</script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js">
</script>
<script>
  var $jq18 = $.noConflict(true);
</script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
</script>
<script>
  var $jq19 = $.noConflict(true);
</script>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.0.0b1.js">
</script>
<script>
  var $jq20 = $.noConflict(true);
</script>
      
<script>
Benchmark.prototype.setup = function() {
  function tests($) {
    $('#menu').css({
      'backgroud': 'red'
    });
    $('.menu-item').eq(2).hasClass('foo');
  }

};
</script>

Preparation code output

<div> <ul id="menu"> <li class="menu-item"> </li> <li class="menu-item"> </li> <li class="menu-item"> </li> <li class="menu-item"> </li> <li class="menu-item"> </li> <li class="menu-item"> </li> </ul> </div> <script> var $jq16 = $.noConflict(true); </script> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"> </script> <script> var $jq17 = $.noConflict(true); </script> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"> </script> <script> var $jq18 = $.noConflict(true); </script> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"> </script> <script> var $jq19 = $.noConflict(true); </script> <script type="text/javascript" src="https://code.jquery.com/jquery-2.0.0b1.js"> </script> <script> var $jq20 = $.noConflict(true); </script>

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
jQuery 1.6.x
tests($jq16);
pending…
jQuery 1.7.x
tests($jq17);
pending…
jQuery 1.8.x
tests($jq18);
pending…
jQuery 1.9.1
tests($jq19);
pending…
jQuery 2.0 beta 1
tests($jq20);
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