jquery 1.7.2 vs 1.4.2 (v20)

Revision 20 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<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>
</div>
<script src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
<script> var $jq163 = jQuery.noConflict( true ); </script>
<script src="//code.jquery.com/jquery-1.7.2.min.js"></script>
<script> var $jq171 = jQuery.noConflict( true ); </script>

Test runner

Ready to run.

Testing in
TestOps/sec
1.6.3 by id
$jq163('#linkone');
ready
1.7.2 by id
$jq171('#linkone')
ready
1.6.3 by class
$jq163('.menuitem');
ready
1.7.2 by class
$jq171('.menuitem');
ready
1.6.3 descendent tag - class
$jq163('div.testmenu a');
ready
1.7.2descendent tag - class
$jq171('div.testmenu a');
ready
1.6.3 by attr
$jq163('a[title="test"]');
ready
1.7.2 by attr
$jq171('a[title="test"]');
ready
1.6.3 with regex
$jq163('a[title*="item"]')
ready
1.7.2 with regex
$jq171('a[title*="item"]');
ready
1.6.3 nth-child(even)
$jq163('li:nth-child(even)');
ready
1.7.2 nth-child(even)
$jq171('li:nth-child(even)');
ready
1.6.3 li:last-child
$jq163('li:last-child');
ready
1.7.2 li:last-child
$jq171('li:last-child');
ready
1.6.3 unquoted attr with simpler regex
$jq163('div[class^=test]');
ready
1.7.2 unquoted attr with simpler regex
$jq171('div[class^=test]');
ready
1.6.3 unquoted attr check
$jq163('div[title=test]');
ready
1.7.2 unquoted attr check
$jq171('div[title=test]');
ready

Revisions

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