getElementById( 'test' ) vs $( '#test' )

Benchmark created by FooBar on


Preparation HTML

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

Test runner

Ready to run.

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

Revisions

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

  • Revision 1: published by FooBar on