Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131
Windows
Desktop
15 days ago
Test name Executions per second
undefined 9955479.0 Ops/sec
typeof 18914318.0 Ops/sec
in 18712574.0 Ops/sec
hasOwnProperty 17650708.0 Ops/sec
bool 18642852.0 Ops/sec
Object.hasOwnProperty 9341534.0 Ops/sec
optional chaining undefined 18910246.0 Ops/sec
Script Preparation code:
Tests:
  • undefined

  • typeof

  • in

  • hasOwnProperty

  • bool

  • Object.hasOwnProperty

  • optional chaining undefined