Spread vs use lodash vs Array.from vs ForFastest: For (495.1x faster)
1,103,212,416 ops/sec
5,884,128 ops/sec
2,758,869 ops/sec
2,228,290 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| Spread | |
| use lodash | |
| Array.from | |
| For |
| Test name | Executions per second |
|---|---|
| ✓ For | 171,462,432 Ops/sec |
| use lodash | 9,313,307 Ops/sec |
| Spread | 2,737,632 Ops/sec |
| Array.from | 2,308,457 Ops/sec |