Run details:
Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 YaBrowser/18.9.0.3409 Yowser/2.5 Safari/537.36
Yandex Browser 18
Windows 8.1
Desktop
6 years ago
Test name Executions per second
for...in 1578.0 Ops/sec
Object.keys+forEach (ES5) 2231.8 Ops/sec
for...of (ES6) 2354.6 Ops/sec
Object.entries (ES8) 1542.0 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)