Run details:
Mozilla/5.0 (Linux; Android 12; SM-F926B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Mobile Safari/537.36
Chrome Mobile 104
Android
Mobile
2 years ago
Test name Executions per second
lodash.each 3683.4 Ops/sec
native for-of w/ entries 2102.5 Ops/sec
native forEach w/ entries 1873.9 Ops/sec
vanilla for-loop w/ Object.keys 792.5 Ops/sec
vanilla for-loop w/ Object.entries 1614.7 Ops/sec
vanilla for-loop w/ Object.values (no keys) 28504.4 Ops/sec
native forEach w/ Object.values (no keys) 14677.3 Ops/sec
native for-in 402.9 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