findIndex vs includes vs map and indexOfFastest: includes (62.9x faster)
882,804 ops/sec
865,986 ops/sec
14,043 ops/sec
Fastest: includes (20.3x faster)
163,808 ops/sec
163,006 ops/sec
8,066 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| findIndex | |
| includes | |
| map and indexOf |
| Test name | Executions per second |
|---|---|
| ✓ findIndex | 332,710 Ops/sec |
| includes | 331,996 Ops/sec |
| map and indexOf | 5,179 Ops/sec |