RegEx vs For LoopFastest: RegEx (4.3x faster)
4,153,540 ops/sec
974,410 ops/sec
Fastest: For Loop (4.4x faster)
39,963,964 ops/sec
8,986,021 ops/sec
Fastest: RegEx (4.1x faster)
3,318,171 ops/sec
812,415 ops/sec
Fastest: RegEx (3.2x faster)
2,127,065 ops/sec
670,295 ops/sec
Fastest: For Loop (3.2x faster)
7,788,368 ops/sec
2,404,199 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 | 38,465,124 Ops/sec |
| RegEx | 11,345,220 Ops/sec |