querySelector instead of getElementById (v2)

Revision 2 of this benchmark created on


Preparation HTML

<div id="foo"></div>

Test runner

Ready to run.

Testing in
TestOps/sec
querySelector
var bar = document.querySelector('#foo');
ready
getElementById
var bar = document.getElementById('foo');
ready

Revisions

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