hasOwnProperty vs direct access (bool) vs inFastest: in (1.2x faster)
16,320,565 ops/sec
16,050,136 ops/sec
14,138,292 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| hasOwnProperty | |
| direct access (bool) | |
| in |
| Test name | Executions per second |
|---|---|
| ✓ in | 244,367,904 Ops/sec |
| direct access (bool) | 228,927,376 Ops/sec |
| hasOwnProperty | 107,208,232 Ops/sec |