Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0
Firefox 101
Windows
Desktop
2 years ago
Test name Executions per second
Object.hasOwnProperty 903288800.0 Ops/sec
Object in 1023498000.0 Ops/sec
Array.indexOf 702225.6 Ops/sec
direct 934947100.0 Ops/sec
Array includes 706639.4 Ops/sec
Object.prototype.hasOwnProperty.call(this.storeIndex, index) 931636400.0 Ops/sec
Reflect.has() 13095260.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()