Speed comparison of jQuery versions (v43)

Revision 43 of this benchmark created 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.2.6/jquery.min.js">
</script>
<script>
  var $jq126 = $.noConflict(true);
</script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js">
</script>
<script>
  var $jq1111 = $.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.2.6
// async test
tests($jq126);
ready
jQuery 1.11.1
tests($jq1111);
ready
jQuery 1.8.x
tests($jq18);
ready
jQuery 1.9.1
tests($jq19);
ready
jQuery 2.0 beta 1
tests($jq20);
ready

Revisions

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