Array.from vs string split vs spread operatorFastest: string split (2.6x faster)
13,929,835 ops/sec
11,852,484 ops/sec
5,268,676 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| Array.from | |
| string split | |
| spread operator |
| Test name | Executions per second |
|---|---|
| ✓ string split | 42,067,400 Ops/sec |
| spread operator | 21,347,024 Ops/sec |
| Array.from | 19,849,134 Ops/sec |