Reduce vs Flat

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Reduce
[[1, 2, 3], [4, 5, 6], [7, 8, 9]].reduce((acc, curr) => {
  return acc.concat(curr)
}, [])
ready
Flat
[[1, 2, 3], [4, 5, 6], [7, 8, 9]].flat()
ready

Revisions

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