ID selector testcases

Benchmark created by seutje on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
  (function($) {
   $('<div id="foo">').appendTo('body');
  })(jQuery);
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
id
$('#foo');
ready
element id
$('div#foo');
ready
gEBI
$(document.getElementById('foo'));
ready
qSA
$(document.querySelectorAll('#foo'));
ready

Revisions

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

  • Revision 1: published by seutje on