Test name | Executions per second |
---|---|
undefined !== nullObject[key] | 934.9 Ops/sec |
"undefined" !== typeof nullObject[key] | 1187.2 Ops/sec |
key in nullObject | 1204.9 Ops/sec |
!!nullObject[key] | 1187.7 Ops/sec |
Object.hasOwn(nullObject, key) | 922.3 Ops/sec |
Object.prototype.hasOwnProperty.call(nullObject, key) | 906.8 Ops/sec |
Object.hasOwn(normalObject, key) | 917.5 Ops/sec |
normalObject.hasOwnProperty(key) | 1159.6 Ops/sec |
map.has(key) | 1162.2 Ops/sec |