jQuery .add() Performance - Including jQuery 1.6.2 (v7)

Revision 7 of this benchmark created on


Preparation HTML

<script src="http://code.jquery.com/jquery-1.3.1.js"></script>
<script>var jq131 = jQuery.noConflict();</script>
<script src="http://code.jquery.com/jquery-1.4.2.js"></script>
<script>var jq142 = jQuery.noConflict();</script>
<script src="http://code.jquery.com/jquery-1.6.js"></script>
<script>var jq16 = jQuery.noConflict();</script>
<script src="http://code.jquery.com/jquery-1.6.1.js"></script>
<script>var jq161 = jQuery.noConflict();</script>
<script src="http://code.jquery.com/jquery-git.js"></script>
<script>var jqgit = jQuery.noConflict();</script>
<div style="display:none;">
<ul>
<li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li>
</ul>
<div>
<span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span>
</div>
</div>
<script>
  spansFor131 = jq131("span");
  spansFor142 = jq142("span");
  spansFor16 = jq16("span");
  spansFor161 = jq161("span");
  spansForGit = jqgit("span");
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
1.4.2 .add()
spansFor142.add("li");
ready
1.6 .add()
spansFor16.add("li");
ready
1.6.1 .add()
spansFor161.add("li");
ready
jq131 .add()
spansFor131.add("li");
ready
Git .add()
spansForGit.add("li");
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.