Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36 Edg/136.0.0.0
Chrome 136
Windows
Desktop
one year ago
Test name Executions per second
undefined 120160184.0 Ops/sec
typeof 126078144.0 Ops/sec
in 127650680.0 Ops/sec
hasOwnProperty 79064760.0 Ops/sec
bool 106656024.0 Ops/sec
Object.hasOwnProperty 66343560.0 Ops/sec
optional chaining undefined 123192248.0 Ops/sec
Script Preparation code:
Tests:
  • undefined

  • typeof

  • in

  • hasOwnProperty

  • bool

  • Object.hasOwnProperty

  • optional chaining undefined