querySelectorAll vs getElementById (v34)

Revision 34 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
querySelector
var result = document.querySelector('#foo');
ready
getElementById
var result = document.getElementById('foo');
ready

Revisions

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