jquery 1.9 vs 2.0b1

JavaScript performance comparison

Revision 37 of this test case created by Paul S

Info

Comparison of performance between jQuery versions

Preparation code

<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>

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
1.9 by id
$jq19('#linkone');
pending…
2.0 by id
$jq20('#linkone')
pending…
1.9 by id with var
var x = document.getElementById("linkone")
$jq19(x);
pending…
2.0 by id with var
var x = document.getElementById("linkone")
$jq20(x);
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment