Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0
Firefox 137
Windows
Desktop
one year ago
Benchmark.js
Object.hasOwnProperty
1831.7M/s
Object.prototype.hasOwnProperty.call(this.storeIndex, index)
1768.6M/s
direct
1657.7M/s
Object in
1577.9M/s
Reflect.has()
44.1M/s
Array includes
1.2M/s
Array.indexOf
1.1M/s
View exact numbers
Test name Executions per second
Object.hasOwnProperty 1,831,670,016 Ops/sec
Object.prototype.hasOwnProperty.call(this.storeIndex, index) 1,768,620,800 Ops/sec
direct 1,657,676,800 Ops/sec
Object in 1,577,928,832 Ops/sec
Reflect.has() 44,088,600 Ops/sec
Array includes 1,166,969 Ops/sec
Array.indexOf 1,143,329 Ops/sec
Script Preparation code:
Tests: