jquery 1.4.2 vs 1.6.2 vs 1.10.1

JavaScript performance comparison

Revision 50 of this test case created by Daniel Worthy

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>
        <form id="testform" action=""></form>
        <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.2/jquery.min.js"></script>
<script> var $jq14 = jQuery.noConflict( true ); </script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script> var $jq16 = jQuery.noConflict( true ); </script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script> var $jq110 = 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.4 by id
$jq14('#linkone');
pending…
1.6 by id
$jq16('#linkone')
pending…
1.10 by id
$jq110('#linkone')
pending…
1.4 by class
$jq14('.menuitem');
pending…
1.6 by class
$jq16('.menuitem');
pending…
1.10 by class
$jq110('.menuitem');
pending…
1.4 descendent tag - class
$jq14('div.testmenu a');
pending…
1.6 descendent tag - class
$jq16('div.testmenu a');
pending…
1.10 descendent tag - class
$jq110('div.testmenu a');
pending…
1.4 by attr
$jq14('a[title="test"]');
pending…
1.6 by attr
$jq16('a[title="test"]');
pending…
1.10 by attr
$jq110('a[title="test"]');
pending…
1.4 input select
$jq14('input');
pending…
1.6 input select
$jq16('input');
pending…
1.10 input select
$jq110('input');
pending…
1.4 generic descendant
$jq14('body div');
pending…
1.6 generic descendant
$jq16('body div');
pending…
1.10 generic descendat
$jq110('body div');
pending…
1.4 multiple
$jq14('div, li, a');
pending…
1.6 multiple
$jq16('div, li, a');
pending…
1.10 multiple
$jq110('div, li, a');
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