Test name | Executions per second |
---|---|
test false | 1367919744.0 Ops/sec |
test undefined | 8687162.0 Ops/sec |
test hasOwnProperty | 127077352.0 Ops/sec |
test == null | 1364875264.0 Ops/sec |
test == undefined | 8738486.0 Ops/sec |
test static hasOwnProperty | 3297056.2 Ops/sec |
test static hasOwn | 7536142.5 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;
}