htmlcollection2array (large)

Benchmark created on


Preparation HTML

<script>
  htmlcol = document.getElementsByTagName("span");
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
slice.call
var aa = Array.prototype.slice.call(htmlcol);
ready
manual copy
var l = htmlcol.length;
var a = new Array(l);
while (l--) a[l] = htmlcol[l];
ready
toArray
var a = htmlcol.toArray();
ready

Revisions

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