copy array slice-vs-concat

Benchmark created on


Setup

var a = [];
  for (var i = 0; i < 100; i++) a.push('550e8400-e29b-41d4-a716-446655440000');

Test runner

Ready to run.

Testing in
TestOps/sec
slice
var b = [];
for (var j = 0; j < 100; j++) b.push(a.slice());
ready
concat
var b = [];
for (var j = 0; j < 100; j++) b.push(a.concat());
ready

Revisions

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