Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0
Firefox 103
Ubuntu
Desktop
one year ago
Test name Executions per second
Object.hasOwnProperty 863737900.0 Ops/sec
Object in 958741100.0 Ops/sec
Array.indexOf 836976.8 Ops/sec
direct 1192299000.0 Ops/sec
Array includes 1144248.0 Ops/sec
Object.prototype.hasOwnProperty.call(this.storeIndex, index) 827597600.0 Ops/sec
Reflect.has() 13709050.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()