jQuery vs JavaScript Performance Comparison (v61)

Revision 61 of this benchmark created by Sidney on


Preparation HTML

<div id="hello"></div>
<div class="bye"></div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery Document ready
$(document).ready();
ready
JavaScript Document ready
document.addEventListener("DOMContentLoaded", function() {
  // code...
});
ready
Javascript document.onload
document.onload;
ready
jquery function()
$(function(){});
ready
GetElementById
var $el = document.getElementById('hello')
ready

Revisions

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