new Map vs Array.from vs Spread OperatorFastest: Spread Operator (25.3x faster)
27,788 ops/sec
26,114 ops/sec
1,096 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| new Map | |
| Array.from | |
| Spread Operator |
| Test name | Executions per second |
|---|---|
| ✓ Spread Operator | 44,084 Ops/sec |
| Array.from | 43,764 Ops/sec |
| new Map | 1,590 Ops/sec |