Speed comparison of latest jQuery versions 1.6-2.1 (v82)

Revision 82 of this benchmark created on


Description

Simple benchmark between jQuery

2.0.3 2.1.3

Preparation HTML

<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/2.0.3/jquery.min.js">
</script>
<script>
  var $jq111 = $.noConflict(true);
</script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js">
</script>
<script>
  var $jq213 = $.noConflict(true);
</script>

Setup

function tests($) {
      $('#menu').css({
        'backgroud': 'red'
      });
      $('.menu-item').eq(2).hasClass('foo');
    }

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery 2.0.3
tests($jq111);
ready
jQuery 2.1.3
tests($jq213);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.