Test name | Executions per second |
---|---|
undefined !== nullObject[key] | 617.2 Ops/sec |
"undefined" !== typeof nullObject[key] | 779.4 Ops/sec |
key in nullObject | 790.5 Ops/sec |
!!nullObject[key] | 781.1 Ops/sec |
Object.hasOwn(nullObject, key) | 616.1 Ops/sec |
Object.prototype.hasOwnProperty.call(nullObject, key) | 602.7 Ops/sec |
Object.hasOwn(normalObject, key) | 616.1 Ops/sec |
normalObject.hasOwnProperty(key) | 764.9 Ops/sec |
map.has(key) | 767.1 Ops/sec |