Speed comparison of latest jQuery versions 1.7.2 - 2.1.4 (v96)

Revision 96 of this benchmark created by Jerome on


Description

wow, a new revision will never show up on the original URL unless selected.. anyway. Simple benchmark between jQuery

2.1.4 1.7.2

Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<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.1.4/jquery.min.js">
</script>
<script>
  var $jq214 = $.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>

Setup

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

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery 1.7.2
tests($jq172);
ready
jQuery 2.1.4
tests($jq214);
ready

Revisions

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