Run details:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36
Chrome 97
Windows
Desktop
2 years ago
Test name Executions per second
Object.hasOwnProperty 4573296.0 Ops/sec
Object in 4076736.8 Ops/sec
Array.indexOf 682072.3 Ops/sec
direct 4433721.0 Ops/sec
Array includes 681875.7 Ops/sec
Object.prototype.hasOwnProperty.call(this.storeIndex, index) 2854300.5 Ops/sec
Reflect.has() 2508427.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()


;