Test name | Executions per second |
---|---|
undefined !== nullObject[key] | 634.2 Ops/sec |
"undefined" !== typeof nullObject[key] | 789.3 Ops/sec |
key in nullObject | 804.9 Ops/sec |
!!nullObject[key] | 790.5 Ops/sec |
Object.hasOwn(nullObject, key) | 638.5 Ops/sec |
Object.prototype.hasOwnProperty.call(nullObject, key) | 631.2 Ops/sec |
Object.hasOwn(normalObject, key) | 638.1 Ops/sec |
normalObject.hasOwnProperty(key) | 796.8 Ops/sec |
map.has(key) | 775.7 Ops/sec |