Test name | Executions per second |
---|---|
test truth | 1078204800.0 Ops/sec |
test undefined | 12296229.0 Ops/sec |
test hasOwnProperty | 160367280.0 Ops/sec |
test in === | 1127436672.0 Ops/sec |
test in ! | 1126103936.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('foo' in n === false)
break;
}
var n = {};
while(true) {
if(!('foo' in n))
break;
}