RegEx vs For LoopFastest: For Loop (1.4x faster)
4,625,820 ops/sec
3,238,961 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| RegEx | |
| For Loop |
| Test name | Executions per second |
|---|---|
| ✓ For Loop | 524,563,872 Ops/sec |
| RegEx | 493,255,808 Ops/sec |