Test name | Executions per second |
---|---|
undefined !== nullObject[key] | 617.2 Ops/sec |
"undefined" !== typeof nullObject[key] | 772.4 Ops/sec |
key in nullObject | 786.9 Ops/sec |
!!nullObject[key] | 776.0 Ops/sec |
Object.hasOwn(nullObject, key) | 612.5 Ops/sec |
Object.prototype.hasOwnProperty.call(nullObject, key) | 613.0 Ops/sec |
Object.hasOwn(normalObject, key) | 616.8 Ops/sec |
normalObject.hasOwnProperty(key) | 760.8 Ops/sec |
map.has(key) | 750.0 Ops/sec |