Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.32 Safari/537.36 Edg/95.0.1020.14
Chrome 95
Mac OS X 10.15.7
Desktop
3 years ago
Test name Executions per second
lodash/keyBy 2839838.8 Ops/sec
keyBy with native reduce 3728565.5 Ops/sec
keyBy with forEach 2076272.9 Ops/sec
keyBy with for loop 3940354.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • lodash/keyBy

  • keyBy with native reduce

  • keyBy with forEach

  • keyBy with for loop