Duplicate array (slice vs concat)

Benchmark created by Felix on


Preparation HTML

var arr = [true, false, true, false, 1, 2, 3, 4];

Test runner

Ready to run.

Testing in
TestOps/sec
Concat
return arr.concat();
ready
Slice
return arr.slice()
ready

Revisions

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