Concat

Benchmark created on


Setup

let a = [];
const b = [];

for (let i = 0; i < 1000; i++)
	a.push(i);
for (let i = 0; i < 1000; i++)
	b.push(i);

Test runner

Ready to run.

Testing in
TestOps/sec
Array concat
a = a.concat(b);
ready
Apply
a.push.apply(a, b);
ready
...
a.push(...b);
ready

Revisions

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