jQuery .add() Performance (v2)

Revision 2 of this benchmark created on


Preparation HTML

<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.5.1.js"></script>
<script>var jq16 = 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>

Test runner

Ready to run.

Testing in
TestOps/sec
1.4.2 .add()
jq142("span").add("li");
ready
1.6 .add()
jq16("span").add("li");
ready
Git .add()
jqgit("span").add("li");
ready

Revisions

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