Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
Chrome 117
Windows
Desktop
one year ago
Test name Executions per second
lodash/keyBy 3499929.0 Ops/sec
keyBy with native reduce 5288032.5 Ops/sec
keyBy with forEach 2671864.2 Ops/sec
keyBy with for loop 5643973.5 Ops/sec
Native Object.groupBy 1268760.6 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • lodash/keyBy

  • keyBy with native reduce

  • keyBy with forEach

  • keyBy with for loop

  • Native Object.groupBy


;