Array.push perf tests

Benchmark created on


Setup

const vals = Array.from({length: 1_000_000}, () => Math.random());

const myArray = Array.from({length: 1_000_000}, () => Math.random());

Test runner

Ready to run.

Testing in
TestOps/sec
forloop
vals.forEach((v) => myArray.push(v));
ready
concat
const myNewArray = myArray.concat(vals)
ready

Revisions

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