substring and substring vs replace inline regexFastest: substring and substring (1.3x faster)
9,410,618 ops/sec
7,361,394 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| substring and substring | |
| replace inline regex |
| Test name | Executions per second |
|---|---|
| ✓ substring and substring | 17,916,472 Ops/sec |
| replace inline regex | 14,084,310 Ops/sec |