Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:49.0) Gecko/20100101 Firefox/49.0
Firefox 49
Mac OS X 10.11
Other
8 years ago
Test name Executions per second
hasOwnProperty 65623792.0 Ops/sec
Object.keys() 3742119.2 Ops/sec
Without hasOwnProperty 65799100.0 Ops/sec
Script Preparation code:
Tests:
  • The slow version

  • Faster version using Object.keys().