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
Using hasOwnProperty 66040852.0 Ops/sec
Using Object.keys() 3164875.5 Ops/sec
Skipping hasOwnProperty() 65953708.0 Ops/sec
Script Preparation code:
Tests:
  • The slow version

  • Faster version using Object.keys().