exist null vs exist hasOwnProperty vs nonexist null vs nonexist hasOwnPropertyFastest: nonexist null (1.1x faster)
25,852,736 ops/sec
23,245,372 ops/sec
23,168,494 ops/sec
22,627,090 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| exist null | |
| exist hasOwnProperty | |
| nonexist null | |
| nonexist hasOwnProperty |
| Test name | Executions per second |
|---|---|
| ✓ exist hasOwnProperty | 481,050,464 Ops/sec |
| nonexist hasOwnProperty | 478,193,760 Ops/sec |
| nonexist null | 474,819,392 Ops/sec |
| exist null | 462,952,544 Ops/sec |