Script Preparation code:
x
 
var arr = [];
var i = 0;
while (i <= 1E5) arr[i] = i++;
Tests:
  • find

     
    const item = arr.find(item => item == 1E5);
  • findIndex

     
    const index = arr.findIndex(item => item == 1E5);
  • indexOf

     
    const index = arr.indexOf(1E5);
  • includes

     
    const included = arr.includes(1E5);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    find
    findIndex
    indexOf
    includes

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0
Firefox 95 on Windows
View result in a separate tab
Test name Executions per second
find 1775.5 Ops/sec
findIndex 1792.7 Ops/sec
indexOf 7024.1 Ops/sec
includes 4738.3 Ops/sec