to Array by slice and concat (v2)

Revision 2 of this benchmark created on


Preparation HTML

<script>
 var items = [1, 2, 3, 4, 5],
     slice = Array.prototype.slice,
     concat = Array.prototype.concat;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Array.prototype.slice
Array.prototype.slice.call(items);
ready
cached prototype
slice.call(items);
ready
[].slice
[].slice.call(items);
ready
Array.slice
Array.slice(items);
ready
Array.prototype.concat
Array.prototype.concat.call(items);
ready
cached prototype (concat)
concat.call(items);
ready
[].concat
[].concat.call(items);
ready
Array.concat
Array.concat(items);
ready

Revisions

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