querySelectorAll-vs-getElementsByTagName-wildcard

Benchmark created by Simon Lindholm on


Test runner

Ready to run.

Testing in
TestOps/sec
querySelectorAll
var a = document.querySelectorAll("*");
for (var i = 0, len = a.length; i < len; i++) window.a = a[i];
ready
getElementsByTagName
var a = document.getElementsByTagName("*");
for (var i = 0, len = a.length; i < len; i++) window.a = a[i];
ready

Revisions

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

  • Revision 1: published by Simon Lindholm on