Run details:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36
Chrome 86
Windows
Desktop
2 years ago
Test name Executions per second
lodash/keyBy 1803781.6 Ops/sec
keyBy with native reduce 2959909.5 Ops/sec
keyBy with forEach 1745987.6 Ops/sec
keyBy with for loop 3165420.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • lodash/keyBy

  • keyBy with native reduce

  • keyBy with forEach

  • keyBy with for loop