Run details:
Mozilla/5.0 (iPad; CPU OS 14_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/95.0.4638.50 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 95
iOS 14.7
Tablet
3 years ago
Test name Executions per second
lodash/keyBy 2912020.2 Ops/sec
keyBy with native reduce 3097731.0 Ops/sec
keyBy with forEach 2161239.8 Ops/sec
keyBy with for loop 3447969.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • lodash/keyBy

  • keyBy with native reduce

  • keyBy with forEach

  • keyBy with for loop