querySelectorAll vs getElementById (v48)

Revision 48 of this benchmark created on


Preparation HTML

<p>bar</p>
<div></idv>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<div></idv>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<div></idv>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<div></idv>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<div></idv>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<div></idv>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<div></idv>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<div></idv>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<div></idv>
<p>bar</p>
<p>bar</p>
<p>bar</p>
<p>bar</p>

Test runner

Ready to run.

Testing in
TestOps/sec
querySelectorAll
var result = document.querySelectorAll('p');
ready
getElementsByTag
var result = document.getElementsByTagName('p');
ready

Revisions

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