push spread operator vs Lodash concat vs Array.prototype.push.apply() vs spread operator vs Array.prototype.concat vs forEach pushFastest: Lodash concat (3.2x faster)
173 ops/sec
160 ops/sec
141 ops/sec
133 ops/sec
132 ops/sec
53 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| push spread operator | |
| Lodash concat | |
| Array.prototype.push.apply() | |
| spread operator | |
| Array.prototype.concat | |
| forEach push |
| Test name | Executions per second |
|---|---|
| ✓ Array.prototype.concat | 367 Ops/sec |
| forEach push | 329 Ops/sec |
| Array.prototype.push.apply() | 317 Ops/sec |
| Lodash concat | 270 Ops/sec |
| push spread operator | 184 Ops/sec |
| spread operator | 70 Ops/sec |