jQuery vs JavaScript Performance Comparison (v51)

Revision 51 of this benchmark created on


Preparation HTML

<div id="main">
<p>Test</p>
<p>Test</p>
<p>Test</p>
<p>Test</p>
<p>Test</p>
<p>Test</p>
<p>Test</p>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery
var $paragraphs = $("#main").find("p");
ready
JavaScript
var main = document.getElementById("main"),
    paragraphs = main.getElementsByTagName("p");
ready

Revisions

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