Tests:
  • array find

    x
     
    const arr = [{id:'A'}, {id:'B'}, {id:'C'}, {id:'D'}, {id:'E'}, {id:'F'}];
    const item = arr.find(i=>i.id === 'C')
  • object index

     
    const obj = {
        'A':{},
        'B':{},
        'C':{},
        'D':{},
        'E':{},
        'F':{}
    }
    const item = obj['C']
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    array find
    object index

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36
Chrome 85 on Mac OS X 10.12.6
View result in a separate tab
Test name Executions per second
array find 25212678.0 Ops/sec
object index 694619648.0 Ops/sec