Test name | Executions per second |
---|---|
undefined !== nullObject[key] | 757.8 Ops/sec |
"undefined" !== typeof nullObject[key] | 954.8 Ops/sec |
key in nullObject | 975.5 Ops/sec |
!!nullObject[key] | 984.0 Ops/sec |
Object.hasOwn(nullObject, key) | 797.1 Ops/sec |
Object.prototype.hasOwnProperty.call(nullObject, key) | 771.2 Ops/sec |
Object.hasOwn(normalObject, key) | 793.3 Ops/sec |
normalObject.hasOwnProperty(key) | 974.9 Ops/sec |
map.has(key) | 980.0 Ops/sec |