jquery 1.7 vs 1.6.4 (v13)

Revision 13 of this benchmark created on


Description

Comparison of performance between jQuery versions

Replaced jQuery 1.4.4 with jQuery 1.7

Preparation HTML

<div id="test"> 
        <div class="testlink">
                <a href="#" id="linkone" title="test">test link</a>
        </div> 
        <div class="testmenu">
                <ul>
                        <li class="menuitem itemone">
                                <a href="#" title="item 1">menu item 1</a>
                        </li>
                        <li class="menuitem itemtwo">
                                <a href="#" title="item 2">menu item 2</a>
                        </li>
                        <li class="menuitem itemthree">
                                not clickable item 3
                        </li>
                </ul>
        </div>
<input name="myName" id="myName" class="myName" type="text" />
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script> var $jq14 = jQuery.noConflict( true ); </script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script> var $jq16 = jQuery.noConflict( true ); </script>

Test runner

Ready to run.

Testing in
TestOps/sec
1.7 by id
$jq14('#linkone');
ready
1.6 by id
$jq16('#linkone')
ready
1.7 by class
$jq14('.menuitem');
ready
1.6 by class
$jq16('.menuitem');
ready
1.7 descendent tag - class
$jq14('div.testmenu a');
ready
1.6 descendent tag - class
$jq16('div.testmenu a');
ready
1.7 unquoted attr check
$jq14('div[title=test]');
ready
1.6 unquoted attr check
$jq16('div[title=test]');
ready
1.7 generic descendant
$jq14('body div');
ready
1.6 generic descendant
$jq16('body div');
ready
1.6 id
$jq16("#myName");
ready
1.6 class
$jq16(".myName");
ready
1.6 name
$jq16("[name='myName']");
ready

Revisions

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