JSON.parse vs String.splitFastest: String.split (1.6x faster)
10,321 ops/sec
6,368 ops/sec
6,091 ops/sec
5,749 ops/sec
Fastest: String.split (1.4x faster)
12,233 ops/sec
8,516 ops/sec
Fastest: String.split (1.3x faster)
6,550 ops/sec
4,977 ops/sec
Fastest: String.split (1.6x faster)
12,101 ops/sec
7,505 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| JSON.parse | |
| String.split |
| Test name | Executions per second |
|---|---|
| ✓ String.split | 20,698 Ops/sec |
| JSON.parse | 8,587 Ops/sec |