jquery 1.8.2 vs 1.5.2

JavaScript performance comparison

Revision 27 of this test case created

Info

Comparison of performance between jQuery versions

Replaced jQuery 1.5.2 with jQuery 1.8.2

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>
<input name="myName" id="myName" class="myName" type="text" />
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script> var $jq152 = jQuery.noConflict( true ); </script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script> var $jq182 = 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.8.2 by id
$jq182('#linkone');
pending…
1.5.2 by id
$jq152('#linkone')
pending…
1.8.2 by class
$jq182('.menuitem');
pending…
1.5.2 by class
$jq152('.menuitem');
pending…
1.8.2 descendent tag - class
$jq182('div.testmenu a');
pending…
1.5.2 descendent tag - class
$jq152('div.testmenu a');
pending…
1.8.2 unquoted attr check
$jq182('div[title=test]');
pending…
1.5.2 unquoted attr check
$jq152('div[title=test]');
pending…
1.8.2 generic descendant
$jq182('body div');
pending…
1.5.2 generic descendant
$jq152('body div');
pending…
1.8.2 id
$jq182("#myName");
pending…
1.5.2 id
$jq152("#myName");
pending…
1.8.2 class
$jq182(".myName");
pending…
1.5.2 class
$jq152(".myName");
pending…
1.8.2 name
$jq182("[name='myName']");
pending…
1.5.2 name
$jq152("[name='myName']");
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