Combine Arrays (v2)

Revision 2 of this benchmark created on


Setup

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

Test runner

Ready to run.

Testing in
TestOps/sec
Array.prototype.concat
const c = a.concat(b);
ready
for (i of b)
const c = [];
for (i of b) {
	a.push(i);
}
ready
restructure
const c = [...a, ...b];
ready

Revisions

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