form.all vs. getElementById

Benchmark created on


Preparation HTML

<html >
<body>

<form name="form1">
<div id="div2">
<div id="div1">

</div>
</div>
</form>


</body>
</html>

Test runner

Ready to run.

Testing in
TestOps/sec
getElementById
document.getElementById("div2");
ready
form1.all
form1.all.div2;
ready

Revisions

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