querySelectorAll vs getElementById (v33)

Revision 33 of this benchmark created on


Preparation HTML

<p id="foo">bar</p>

Test runner

Ready to run.

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

Revisions

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