Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Chrome 133
Mac OS X 10.15.7
Desktop
2 months ago
Test name Executions per second
Object.hasOwnProperty 38182528.0 Ops/sec
Object in 85692664.0 Ops/sec
Array.indexOf 1295459.8 Ops/sec
direct 71988488.0 Ops/sec
Array includes 1230289.5 Ops/sec
Object.prototype.hasOwnProperty.call(this.storeIndex, index) 99571224.0 Ops/sec
Reflect.has() 71646896.0 Ops/sec
Script Preparation code:
Tests:
  • Object.hasOwnProperty

  • Object in

  • Array.indexOf

  • direct

  • Array includes

  • Object.prototype.hasOwnProperty.call(this.storeIndex, index)

  • Reflect.has()