jquery 1.8.0 vs 1.4.3 (v24)

Revision 24 of this benchmark created on


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>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script> var $jq144 = jQuery.noConflict( true ); </script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script> var $jq = jQuery.noConflict( true ); </script>

Test runner

Ready to run.

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

Revisions

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