Replace (SIMPLE) vs Split and Join vs Replace (REGEX)Fastest: Replace (SIMPLE) (23.6x faster)
4,940,108 ops/sec
437,516 ops/sec
209,630 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| Replace (SIMPLE) | |
| Split and Join | |
| Replace (REGEX) |
| Test name | Executions per second |
|---|---|
| ✓ Replace (SIMPLE) | 5,394,970 Ops/sec |
| Split and Join | 292,555 Ops/sec |
| Replace (REGEX) | 221,779 Ops/sec |