regex.exec vs string.match10,691,795 ops/sec
10,508,943 ops/sec
Fastest: regex.exec (1.3x faster)
25,084,330 ops/sec
20,016,014 ops/sec
Fastest: regex.exec (4.2x faster)
364,713,408 ops/sec
86,560,560 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| regex.exec | |
| string.match |
| Test name | Executions per second |
|---|---|
| ✓ regex.exec | 37,144,960 Ops/sec |
| string.match | 32,567,936 Ops/sec |