Vanilla JS vs jQuery (v8)

Revision 8 of this benchmark created by Mark on


Preparation HTML

<script src="http://code.jquery.com/jquery-2.0.2.min.js"></script>
<div id="myelement"></div>

Test runner

Ready to run.

Testing in
TestOps/sec
Vanilla JS
document.getElementById('myelement').innerHTML = "I was written with JavaScript!";
ready
jQuery
$("#myelement")[0].innerHTML = "I was written with jQuery!";
ready

Revisions

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