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

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

     
    const index = arr.findIndex(item => item == 1E5) > -1;
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Array.prototype.find
    Array.prototype.findIndex

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0
Firefox 85 on Windows
View result in a separate tab
Test name Executions per second
Array.prototype.find 1950.5 Ops/sec
Array.prototype.findIndex 1897.9 Ops/sec