Run details:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4103.102 Safari/537.36
Chrome 85
Windows 7
Desktop
3 years ago
Test name Executions per second
Object.entries 22854.9 Ops/sec
Object.keys 45065.5 Ops/sec
Object.keys with extra array 26601.6 Ops/sec
Object.entries without array 23189.0 Ops/sec
Script Preparation code:
Tests:
  • Object.entries

  • Object.keys

  • Object.keys with extra array

  • Object.entries without array