Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1
Mobile Safari 16
iOS 16.0
Mobile
2 years ago
Test name Executions per second
Object.hasOwnProperty 3365495.8 Ops/sec
Object in 3052140.5 Ops/sec
Array.indexOf 173036.5 Ops/sec
direct 3140713.8 Ops/sec
Array includes 102458.5 Ops/sec
Object.prototype.hasOwnProperty.call(this.storeIndex, index) 2236848.2 Ops/sec
Reflect.has() 2106457.8 Ops/sec
Script Preparation code:
Tests:
  • Object.hasOwnProperty

  • Object in

  • Array.indexOf

  • direct

  • Array includes

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

  • Reflect.has()


;