jQuery type vs. colon selector (v2)

Revision 2 of this benchmark created by Jasmine on


Preparation HTML

<form>
<div><span><input type="checkbox"> Test</span></div>
<div><span><input type="checkbox"> Test</span></div>
<div><span><input type="checkbox"> Test</span></div>
<div><span><input type="checkbox"> Test</span></div>
<div><span><input type="checkbox"> Test</span></div>
<div><span><input type="checkbox"> Test</span></div>
<div><span><input type="checkbox"> Test</span></div>
<div><span><input type="checkbox"> Test</span></div>
</form>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
Colon
$(":input");
ready
Type
$("input[type='checkbox']");
ready
Element
$("input");
ready

Revisions

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