.startsWith() vs RegExpFastest: .startsWith() (3.3x faster)
19,911 ops/sec
6,035 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| .startsWith() | |
| RegExp |
| Test name | Executions per second |
|---|---|
| ✓ .startsWith() | 26,135 Ops/sec |
| RegExp | 8,634 Ops/sec |