Array.find vs Array.indexOfFastest: Array.indexOf (56.0x faster)
112,514 ops/sec
2,009 ops/sec
Fastest: Array.indexOf (4.7x faster)
13,029 ops/sec
2,785 ops/sec
Fastest: Array.indexOf (54.4x faster)
70,370 ops/sec
1,293 ops/sec
Fastest: Array.indexOf (2.1x faster)
38,985 ops/sec
18,598 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| Array.find | |
| Array.indexOf |
| Test name | Executions per second |
|---|---|
| ✓ Array.indexOf | 76,400 Ops/sec |
| Array.find | 2,995 Ops/sec |