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

Revision 97 of this benchmark created by leon on


Description

wow, a new revision will never show up on the original URL unless selected.. anyway. Simple benchmark between jQuery 1.8.1 1.11.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/1.8.1/jquery.min.js">
</script>
<script>
  var $jq18 = $.noConflict(true);
</script>

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js">
</script>
<script>
  var $jq111 = $.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 1.8.1
tests($jq18);
ready
jQuery 1.11.3
tests($jq111);
ready

Revisions

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