jquery 1.8.3 vs 1.5.2

JavaScript performance comparison

Revision 30 of this test case created

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>
  <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.3/jquery.min.js"></script>
<script> var $jq183 = 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
id 1.8.3: $jq183('#linkone');
$jq183('#linkone');
pending…
id 1.5.2: $jq152('#linkone');
$jq152('#linkone');
pending…
class 1.8.3: $jq183('.menuitem');
$jq183('.menuitem');
pending…
class 1.5.2: $jq152('.menuitem');
$jq152('.menuitem');
pending…
descendent tag - class 1.8.2: $jq183('div.testmenu a');
$jq183('div.testmenu a');
pending…
descendent tag - class 1.5.2: $jq152('div.testmenu a');
$jq152('div.testmenu a');
pending…
unquoted attr check 1.8.2: $jq183('div[title=test]');
$jq183('div[title=test]');
pending…
unquoted attr check 1.5.2: $jq152('div[title=test]');
$jq152('div[title=test]');
pending…
generic descendant 1.8.3: $jq183('body div');
$jq183('body div');
pending…
generic descendant 1.5.2: $jq152('body div');
$jq152('body div');
pending…
name 1.8.2: $jq183("[name='myName']");
$jq183("[name='myName']");
pending…
name 1.5.2: $jq152("[name='myName']");
$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