jQuery 1.7.2 vs 1.8 rc1 comparisons

JavaScript performance comparison

Revision 16 of this test case created by

Preparation code

<script src="http://code.jquery.com/jquery-1.8.0.min.js">
</script>
<script>
  var $18r = jQuery.noConflict();
</script>
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js">
</script>
<script>
  var $172 = jQuery.noConflict();
</script>
<div class="wrapper">
  <div class="innerWrapper">
    <div class="button">
      <a href="" id="button" class="buttonRef">
      <span class="buttonText">Text</span>
      </a>
    </div>
  </div>
</div>
<script>
  var context18r = $18r("div.wrapper");
  var context172 = $172("div.wrapper");
</script>
    

Preparation code output

<div class="wrapper"> <div class="innerWrapper"> <div class="button"> <a href="" id="button" class="buttonRef"> <span class="buttonText">Text</span> </a> </div> </div> </div>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
Get - Class 1.7.2
var item = $172(".buttonRef").val("111");
pending…
Find - Class 1.7.2
var item = context172.find(".buttonRef")
pending…
Find - Class 1.8
var item = context18r.find(".buttonRef")
pending…
Get - Class 1.8
var item = $18r(".buttonRef").val("111");
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.

0 Comments