Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0
Firefox 119
Mac OS X 10.15
Desktop
one year ago
Test name Executions per second
lodash/keyBy 6981227.5 Ops/sec
keyBy with native reduce 10729348.0 Ops/sec
keyBy with forEach 7696338.0 Ops/sec
keyBy with for loop 15129373.0 Ops/sec
Native Object.groupBy 6282421.0 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