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

Revision 6 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>

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
1.6.1 .add()
jq161("span").add("li");
ready
jq131 .add()
jq131("span").add("li");
ready

Revisions

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