joning 2 arrays

Benchmark created on


Setup

const a = [];
const b = [];
for(let i = 0; i<1000; i++) {
	a.push(i);
	b.push(i+1000);
}

Test runner

Ready to run.

Testing in
TestOps/sec
destruct
const output = [...a, ...b];
ready
concat
const output = a.concat(b);
ready

Revisions

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