Script Preparation code:
x
 
var arr = []
for(let i = 0;i<10000;i++) arr[i] = {name: `listitem${i}`, id: i};
Tests:
  • find

     
    arr.find((id) => id === 7999)
  • findIndex

     
    arr.findIndex((id) => id === 7999)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    find
    findIndex

    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/101.0.4951.54 Safari/537.36
Chrome 101 on Windows
View result in a separate tab
Test name Executions per second
find 11624.7 Ops/sec
findIndex 10872.0 Ops/sec