RegEx.test vs String.includes vs String.matchFastest: String.includes (8.2x faster)
79,800,344 ops/sec
33,680,112 ops/sec
9,673,724 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| RegEx.test | |
| String.includes | |
| String.match |
| Test name | Executions per second |
|---|---|
| ✓ String.includes | 2,175,077,632 Ops/sec |
| RegEx.test | 50,022,600 Ops/sec |
| String.match | 32,797,294 Ops/sec |