jquery 1.4.2 vs 1.6.2 vs 1.10.1 (v50)

Revision 50 of this benchmark created by Daniel Worthy 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> 
        <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="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script> var $jq14 = jQuery.noConflict( true ); </script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script> var $jq16 = jQuery.noConflict( true ); </script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script> var $jq110 = jQuery.noConflict( true ); </script>

Test runner

Ready to run.

Testing in
TestOps/sec
1.4 by id
$jq14('#linkone');
ready
1.6 by id
$jq16('#linkone')
ready
1.10 by id
$jq110('#linkone')
ready
1.4 by class
$jq14('.menuitem');
ready
1.6 by class
$jq16('.menuitem');
ready
1.10 by class
$jq110('.menuitem');
ready
1.4 descendent tag - class
$jq14('div.testmenu a');
ready
1.6 descendent tag - class
$jq16('div.testmenu a');
ready
1.10 descendent tag - class
$jq110('div.testmenu a');
ready
1.4 by attr
$jq14('a[title="test"]');
ready
1.6 by attr
$jq16('a[title="test"]');
ready
1.10 by attr
$jq110('a[title="test"]');
ready
1.4 input select
$jq14('input');
ready
1.6 input select
$jq16('input');
ready
1.10 input select
$jq110('input');
ready
1.4 generic descendant
$jq14('body div');
ready
1.6 generic descendant
$jq16('body div');
ready
1.10 generic descendat
$jq110('body div');
ready
1.4 multiple
$jq14('div, li, a');
ready
1.6 multiple
$jq16('div, li, a');
ready
1.10 multiple
$jq110('div, li, a');
ready

Revisions

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