Speed comparison of jQuery versions (v39)

Revision 39 of this benchmark created by 1.8 vs 1.11 on


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/jquery.min.js">
</script>
<script>
  var $jq18 = $.noConflict(true);
</script>

<script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js">
</script>
<script>
  var $jq11 = $.noConflict(true);
</script>

Setup

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

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery 1.8.x
tests($jq18);
ready
jQuery 1.11.x
tests($jq11);
ready

Revisions

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