jquery 1.9 vs 2.0b1 (v37)

Revision 37 of this benchmark created by Paul S on


Description

Comparison of performance between jQuery versions

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="http://code.jquery.com/jquery-1.9.0.min.js"></script>
<script> var $jq19 = jQuery.noConflict( true ); </script>
<script src="http://code.jquery.com/jquery-2.0.0b1.min.js"></script>
<script> var $jq20 = jQuery.noConflict( true ); </script>

Test runner

Ready to run.

Testing in
TestOps/sec
1.9 by id
$jq19('#linkone');
ready
2.0 by id
$jq20('#linkone')
ready
1.9 by id with var
var x = document.getElementById("linkone")
$jq19(x);
ready
2.0 by id with var
var x = document.getElementById("linkone")
$jq20(x);
ready

Revisions

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