Object.prototype.hasOwnProperty vs obj.hasOwnProperty vs Object.hasOwnFastest: obj.hasOwnProperty (1.9x faster)
12,306,361 ops/sec
6,750,620 ops/sec
6,594,518 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| Object.prototype.hasOwnProperty | |
| obj.hasOwnProperty | |
| Object.hasOwn |
| Test name | Executions per second |
|---|---|
| ✓ Object.prototype.hasOwnProperty | 999,721,984 Ops/sec |
| Object.hasOwn | 993,050,048 Ops/sec |
| obj.hasOwnProperty | 874,041,472 Ops/sec |