Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36
Chrome 94
Windows
Desktop
3 years ago
Test name Executions per second
lodash.each 2537.4 Ops/sec
lodash.map 2104.6 Ops/sec
Object.entries.forEach 819.6 Ops/sec
vanilla for-loop w/ Object.entries 994.0 Ops/sec
Object.keys.forEach 668.6 Ops/sec
vanilla for-loop w/ Object.keys 756.1 Ops/sec
for in 679.0 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