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.2 Ops/sec
typeof 11160445.0 Ops/sec
in 10344433.0 Ops/sec
hasOwnProperty 9902569.0 Ops/sec
bool 11311358.0 Ops/sec
Object.prototype.hasOwnProperty 1803497.5 Ops/sec
Script Preparation code:
Tests:
  • undefined

  • typeof

  • in

  • hasOwnProperty

  • bool

  • Object.prototype.hasOwnProperty