Native/QuerySelector VS jQuery (v12)

Revision 12 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<div>
  <div id="foo">
    <div class="bar">
    </div>
  </div>
</div>
<div id="baz">
</div>
<div class="bar">
</div>

Test runner

Ready to run.

Testing in
TestOps/sec
Native
var id = document.getElementById("foo");
ready
querySelector
var id = document.querySelector("#foo");
ready
jQuery
var id = jQuery("#foo");
ready

Revisions

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