tag#id vs id

Benchmark created by Stephen B on


Preparation HTML

<form action="?" method="get">
  <input id="email" type="email" name="email" />
</form>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>

Setup

var x = null;

Test runner

Ready to run.

Testing in
TestOps/sec
input#email
x = $('input#email');
ready
#email
x = $('#email');
ready

Revisions

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

  • Revision 1: published by Stephen B on