jQuery() vs. querySelectorAll()

Benchmark created by TJ VanToll on


Preparation HTML

<script src="https://code.jquery.com/jquery-2.0.3.min.js"></script>
<ul>
    <li>One</li>
    <li>Two</li>
    <li>Three</li>
</ul>

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery()
$( "li" );
ready
querySelectorAll()
document.querySelectorAll( "li" );
ready

Revisions

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