Array append

Benchmark created on


Setup

const a = Array.from({ length: 10000 }).fill({});
const b = [];

Test runner

Ready to run.

Testing in
TestOps/sec
push
for (const v of a)
	b.push(v);
ready
spread
b.push(...a);
ready
apply
Array.prototype.push.apply(b, a);
ready

Revisions

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