# vs. document.getElementById

Benchmark created by ethagnawl on


Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
#
$('#div');
ready
document.getElementById
$(document.getElementById('div'));
ready

Revisions

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

  • Revision 1: published by ethagnawl on
  • Revision 2: published by bigbossSNK on