Script Preparation code:
Tests:

Historical Performance Data aggregated from 16 community runs

Desktop Results:
Chrome 16 runs
findIndex
1.1M/s
map and indexOf
18K/s

Fastest: findIndex (60.1x faster)

View exact numbers
  • findIndex: 1,079,732 ops/sec
  • map and indexOf: 17,951 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
    map and indexOf

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:139.0) Gecko/20100101 Firefox/139.0
Firefox 139 on Windows
View result in a separate tab
findIndex
328K/s
map and indexOf
14K/s
View exact numbers
Test name Executions per second
findIndex 328,196 Ops/sec
map and indexOf 14,330 Ops/sec