String.split vs Regex.matchFastest: String.split (6.6x faster)
10,912,101 ops/sec
1,641,791 ops/sec
Fastest: String.split (1.8x faster)
3,674,074 ops/sec
2,003,800 ops/sec
Fastest: String.split (6.2x faster)
15,572,216 ops/sec
2,502,902 ops/sec
Fastest: String.split (6.9x faster)
8,095,283 ops/sec
1,169,749 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| String.split | |
| Regex.match |
| Test name | Executions per second |
|---|---|
| ✓ String.split | 12,348,868 Ops/sec |
| Regex.match | 1,609,296 Ops/sec |