Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0
Firefox 99
Windows
Desktop
2 years ago
Test name Executions per second
for...in 51789.8 Ops/sec
Object.keys+forEach (ES5) 41291.3 Ops/sec
for...of - keys (ES6) 38348.6 Ops/sec
for...of - values (ES6) 61313.5 Ops/sec
for...of - entries (ES8) 20462.1 Ops/sec
Object.entries (ES8) 28687.8 Ops/sec
Script Preparation code:
Tests:
  • for...in

  • Object.keys+forEach (ES5)

  • for...of - keys (ES6)

  • for...of - values (ES6)

  • for...of - entries (ES8)

  • Object.entries (ES8)


;