includes vs startsWithFastest: includes (3.8x faster)
171,709,472 ops/sec
45,265,924 ops/sec
1,556,397,696 ops/sec
1,550,883,712 ops/sec
Fastest: startsWith (1.6x faster)
67,742,600 ops/sec
42,446,336 ops/sec
Fastest: includes (2.0x faster)
65,279,952 ops/sec
33,381,428 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| includes | |
| startsWith |
| Test name | Executions per second |
|---|---|
| ✓ includes | 245,173,008 Ops/sec |
| startsWith | 51,281,152 Ops/sec |