Compare push vs concat

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Concat
const rows = []
for (let i = 0; i < 40000; i += 1) { 
  rows.concat(i);
}
ready
Push
const rows = []
for (let i = 0; i < 40000; i += 1) { 
  rows.push(i);
}
ready
Destructure
let rows = []
for (let i = 0; i < 40000; i += 1) { 
  rows = [...rows, i]
}
ready

Revisions

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