Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Chrome 133
Mac OS X 10.15.7
Desktop
one year ago
Benchmark.js
Object.prototype.hasOwnProperty.call(this.storeIndex, index)
99.6M/s
Object in
85.7M/s
direct
72.0M/s
Reflect.has()
71.6M/s
Object.hasOwnProperty
38.2M/s
Array.indexOf
1.3M/s
Array includes
1.2M/s
View exact numbers
Test name Executions per second
Object.prototype.hasOwnProperty.call(this.storeIndex, index) 99,571,224 Ops/sec
Object in 85,692,664 Ops/sec
direct 71,988,488 Ops/sec
Reflect.has() 71,646,896 Ops/sec
Object.hasOwnProperty 38,182,528 Ops/sec
Array.indexOf 1,295,460 Ops/sec
Array includes 1,230,290 Ops/sec
Script Preparation code:
Tests: