Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 YaBrowser/23.11.7.57.10 SA/3 Mobile/15E148 Safari/604.1
Yandex Browser 23
iOS 17.2
Mobile
10 months ago
Test name Executions per second
for...in 15588.4 Ops/sec
Object.keys+forEach (ES5) 19597.9 Ops/sec
for...of - keys (ES6) 19712.9 Ops/sec
for...of - values (ES6) 33893.6 Ops/sec
for...of - entries (ES8) 21794.5 Ops/sec
Object.entries (ES8) 21672.2 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)


;