Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 OPR/100.0.0.0 (Edition beta)
Opera 100
Windows
Desktop
10 months ago
Test name Executions per second
Object.hasOwnProperty 2708706.0 Ops/sec
Object in 2444101.0 Ops/sec
Array.indexOf 650504.8 Ops/sec
direct 2491432.0 Ops/sec
Array includes 651152.3 Ops/sec
Object.prototype.hasOwnProperty.call(this.storeIndex, index) 1636707.0 Ops/sec
Reflect.has() 1394171.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()