Id retrieval

Benchmark created by Arexkun on


Preparation HTML

<div id="a">My id=="a"</div>
<script>
  document.all = document.all || document.getElementsByTagName("*")
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Get element by id
document.getElementById("a")
ready
From document.all
document.all.a
ready

Revisions

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