jquery 1.8.0 vs 1.4.3

JavaScript performance comparison

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