getElementsByTagName vs getElementsByClassName (v24)

Revision 24 of this benchmark created on


Preparation HTML

<div class="div"></div>

Test runner

Ready to run.

Testing in
TestOps/sec
getElementsByTagName
document.getElementsByTagName("div");
ready
getElementsByClassName
document.querySelectorAll(".div");
ready

Revisions

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