Speed comparison of jQuery versions (v69)

Revision 69 of this benchmark created by gferon 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>
    
  </ul>
</div>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js">
</script>
<script>
  var $jq132 = $.noConflict(true);
</script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js">
</script>
<script>
  var $jq14 = $.noConflict(true);
</script>
<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.2/jquery.min.js">
</script>
<script>
  var $jq172 = $.noConflict(true);
</script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
</script>
<script>
  var $jq183 = $.noConflict(true);
</script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
</script>
<script>
  var $jq191 = $.noConflict(true);
</script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js">
</script>
<script>
  var $jq1101 = $.noConflict(true);
</script>
<script type="text/javascript" src="//code.jquery.com/jquery-2.1.0.min.js">
</script>
<script>
  var $jq210 = $.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.3.2
tests($jq132);
ready
jQuery 1.4.x
tests($jq14);
ready
jQuery 1.6.x
tests($jq16);
ready
jQuery 1.8.3
tests($jq183);
ready
jQuery 1.9.1
tests($jq191);
ready
jQuery 1.10.1
tests($jq1101);
ready
jQuery 2.1.0
tests($jq210);
ready
JQuery 1.7.2
tests($jq172);
ready

Revisions

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