Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/109.0
Firefox 109
Ubuntu
Desktop
2 years ago
Test name Executions per second
test truth 1771618304.0 Ops/sec
test undefined 1736551424.0 Ops/sec
test hasOwnProperty 1569789824.0 Ops/sec
Script Preparation code:
AخA
 
var n ={};
Tests:
  • test truth

    x
     
        if(!n.foo) {
        }
  • test undefined

     
        if(n.foo===undefined) 
        {
        }
  • test hasOwnProperty

     
        if(!Object.hasOwn(n,'foo')) 
        {
        }