reduce + Array.prototype.concat vs Array.prototype.flat vs concat using decompositionFastest: concat using decomposition (2.1x faster)
15,703,672 ops/sec
12,790,720 ops/sec
7,505,332 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| reduce + Array.prototype.concat | |
| Array.prototype.flat | |
| concat using decomposition |
| Test name | Executions per second |
|---|---|
| ✓ concat using decomposition | 17,665,802 Ops/sec |
| reduce + Array.prototype.concat | 10,846,811 Ops/sec |
| Array.prototype.flat | 7,839,980 Ops/sec |