jquery 1.7.1 vs 1.4.3

JavaScript performance comparison

Revision 17 of this test case created

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="//ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
<script> var $jq163 = jQuery.noConflict( true ); </script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script> var $jq171 = 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.3 by id
$jq163('#linkone');
pending…
1.7.1 by id
$jq171('#linkone')
pending…
1.4.3 by class
$jq163('.menuitem');
pending…
1.7.1 by class
$jq171('.menuitem');
pending…
1.4.3 descendent tag - class
$jq163('div.testmenu a');
pending…
1.7.1 descendent tag - class
$jq171('div.testmenu a');
pending…
1.4.3 by attr
$jq163('a[title="test"]');
pending…
1.7.1 by attr
$jq171('a[title="test"]');
pending…
1.4.3 with regex
$jq163('a[title*="item"]')
pending…
1.7.1 with regex
$jq171('a[title*="item"]');
pending…
1.4.3 nth-child(even)
$jq163('li:nth-child(even)');
pending…
1.7.1 nth-child(even)
$jq171('li:nth-child(even)');
pending…
1.4.3 li:last-child
$jq163('li:last-child');
pending…
1.7.1 li:last-child
$jq171('li:last-child');
pending…
1.4.3 unquoted attr with simpler regex
$jq163('div[class^=test]');
pending…
1.7.1 unquoted attr with simpler regex
$jq171('div[class^=test]');
pending…
1.4.3 unquoted attr check
$jq163('div[title=test]');
pending…
1.7.1 unquoted attr check
$jq171('div[title=test]');
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