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

     
    array.includes('sausage')
  • Object[key]

     
    obj['sausage']
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Includes
    Object[key]

    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_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36
Chrome 89 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
Includes 15215021.0 Ops/sec
Object[key] 13872604.0 Ops/sec