Script Preparation code:
AخA
 
var obj = (new Array(1000)).fill(null).reduce((prev, newVal) => {prev[Math.random() + ''] = Math.random() + ''; return prev; }, { sausage: 'tst' });
var array = Object.keys(obj);
Tests:
  • find

     
    array.find((item) => item === 'sausage')
  • Object[key]

     
    obj['sausage']
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    find
    Object[key]

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:135.0) Gecko/20100101 Firefox/135.0
Firefox 135 on Mac OS X 10.15
View result in a separate tab
Test name Executions per second
find 1050238528.0 Ops/sec
Object[key] 1577858304.0 Ops/sec