Test name | Executions per second |
---|---|
test false | 127937272.0 Ops/sec |
test undefined | 15704152.0 Ops/sec |
test hasOwnProperty | 95204312.0 Ops/sec |
test == null | 185662608.0 Ops/sec |
test == undefined | 15813345.0 Ops/sec |
test static hasOwnProperty | 7224817.0 Ops/sec |
test static hasOwn | 14250494.0 Ops/sec |
var n = {};
while(true) {
if(!n.foo)
break;
}
var n = {};
while(true) {
if(n.foo===undefined)
break;
}
var n = {};
while(true) {
if(!n.hasOwnProperty('foo'))
break;
}
var n = {};
while(true) {
if(n.foo==null)
break;
}
var n = {};
while(true) {
if(n.foo==undefined)
break;
}
var n = {};
while(true) {
if(!Object.hasOwnProperty(n,'foo'))
break;
}
var n = {};
while(true) {
if(!Object.hasOwn(n, 'foo'))
break;
}