Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15
Safari 11
Mac OS X 10.11.6
Desktop
5 years ago
Test name Executions per second
lodash.each 227.6 Ops/sec
native for-of w/ entries 154.1 Ops/sec
native forEach w/ entries 163.9 Ops/sec
vanilla for-loop w/ Object.keys 144.1 Ops/sec
vanilla for-loop w/ Object.entries 161.1 Ops/sec
vanilla for-loop w/ Object.values (no keys) 220.6 Ops/sec
native forEach w/ Object.values (no keys) 213.3 Ops/sec
native for-in 125.6 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