Script Preparation code:
x
 
var arr = [];
var ms = new Map();
var i = 0;
while (i <= 1E5) {
  arr[i] = i;
  ms.set(i, i);
  i++;
}
Tests:
  • Array.find

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

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

     
    ms.has(1E5 - 1)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Array.find
    Array.indexOf
    dsds

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
Chrome 125 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
Array.find 2002.4 Ops/sec
Array.indexOf 87336.4 Ops/sec
dsds 24850028.0 Ops/sec