Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
Chrome 67
Linux
Desktop
6 years ago
Test name Executions per second
undefined 2940678.0 Ops/sec
typeof 11160450.0 Ops/sec
in 10344430.0 Ops/sec
hasOwnProperty 9902569.0 Ops/sec
bool 11311360.0 Ops/sec
Object.prototype.hasOwnProperty 1803498.0 Ops/sec
Script Preparation code:
Tests:
  • undefined

  • typeof

  • in

  • hasOwnProperty

  • bool

  • Object.prototype.hasOwnProperty