Concat vs push

Benchmark created on


Setup

const arr = new Array(10000).fill(1);

Test runner

Ready to run.

Testing in
TestOps/sec
Concat
arr.reduce((acc, curr) => {
	return	acc.concat(curr);
}, []);
ready
Push
arr.reduce((acc, curr) => {
	acc.push(curr);
	return acc;
}, []);
ready

Revisions

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