Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36
Chrome 102
Windows
Desktop
one year ago
Test name Executions per second
Object.hasOwnProperty 4003267.0 Ops/sec
Object in 3747899.0 Ops/sec
Array.indexOf 1042107.0 Ops/sec
direct 3737020.0 Ops/sec
Array includes 979968.5 Ops/sec
Object.prototype.hasOwnProperty.call(this.storeIndex, index) 2406492.0 Ops/sec
Reflect.has() 2101660.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()