Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.80 Safari/537.36 Edg/98.0.1108.50
Chrome 98
Windows
Desktop
2 years ago
Test name Executions per second
lodash.each 3082.9 Ops/sec
lodash.map 3103.2 Ops/sec
Object.entries.forEach 1506.1 Ops/sec
vanilla for-loop w/ Object.entries 1842.7 Ops/sec
Object.keys.forEach 848.2 Ops/sec
vanilla for-loop w/ Object.keys 917.2 Ops/sec
for in 828.9 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • lodash.each

  • lodash.map

  • Object.entries.forEach

  • vanilla for-loop w/ Object.entries

  • Object.keys.forEach

  • vanilla for-loop w/ Object.keys

  • for in