jQUery type Selector vs Native (v9)

Revision 9 of this benchmark created by Dan on


Preparation HTML

<div>
<input id="a" value="1">
<label for="a">1</label>
</div>
<div>
<input id="b" value="2">
<label for="b">2</label>
</div>
<div>
<input id="c" value="3">
<label for="c">3</label>
</div>

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery type selector
$("input");
ready
Jquery find
$(document).find("input");
ready
Native QuerySelectorAll
document.querySelectorAll("input");
ready
Native getElementsByTagName
document.getElementsByTagName("input")
ready

Revisions

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