Run details:
Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Mobile/15E148 Safari/604.1
Mobile Safari 12
iOS 12.2
Tablet
5 years ago
Test name Executions per second
lodash.each 279.0 Ops/sec
native for-of w/ entries 236.5 Ops/sec
native forEach w/ entries 216.8 Ops/sec
vanilla for-loop w/ Object.keys 226.6 Ops/sec
vanilla for-loop w/ Object.entries 251.2 Ops/sec
vanilla for-loop w/ Object.values (no keys) 321.1 Ops/sec
native forEach w/ Object.values (no keys) 333.4 Ops/sec
native for-in 189.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • lodash.each

  • native for-of w/ entries

  • native forEach w/ entries

  • vanilla for-loop w/ Object.keys

  • vanilla for-loop w/ Object.entries

  • vanilla for-loop w/ Object.values (no keys)

  • native forEach w/ Object.values (no keys)

  • native for-in