Regex vs endsWithFastest: endsWith (11.0x faster)
93,976,336 ops/sec
8,581,422 ops/sec
Fastest: endsWith (106.6x faster)
1,558,309,376 ops/sec
14,622,450 ops/sec
Fastest: endsWith (3.9x faster)
74,656,512 ops/sec
19,381,944 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| Regex | |
| endsWith |
| Test name | Executions per second |
|---|---|
| ✓ endsWith | 90,444,824 Ops/sec |
| Regex | 5,265,262 Ops/sec |