Script Preparation code:
Tests:

Historical Performance Data aggregated from 8 community runs

Desktop Results:
Chrome 8 runs
indexOf
946K/s
findIndex
2K/s

Fastest: indexOf (395.5x faster)

View exact numbers
  • indexOf: 945,944 ops/sec
  • findIndex: 2,392 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    findIndex
    indexOf

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Chrome 122 on Windows
View result in a separate tab
indexOf
518K/s
findIndex
1K/s
View exact numbers
Test name Executions per second
indexOf 518,103 Ops/sec
findIndex 1,228 Ops/sec