copy array

Benchmark created by fdkaladf on


Setup

var original = [1,2,3,4,5,6,7,8,9,10];

Test runner

Ready to run.

Testing in
TestOps/sec
slice
var copy = original.slice(0);
ready
iterate
var copy = []
for(var i in original) {
  copy.push(original[i])
}
ready

Revisions

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

  • Revision 1: published by fdkaladf on