Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36
Chrome 92
Mac OS X 10.14.3
Desktop
3 years ago
Test name Executions per second
lodash/keyBy 3043788.5 Ops/sec
keyBy with native reduce 4102385.0 Ops/sec
keyBy with forEach 2221619.0 Ops/sec
keyBy with for loop 4225347.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • lodash/keyBy

  • keyBy with native reduce

  • keyBy with forEach

  • keyBy with for loop