Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Chrome 121
Windows
Desktop
8 months ago
Test name Executions per second
_.sumBy value 960.4 Ops/sec
map and reduce 2164.6 Ops/sec
_.sumBy with map 1129.2 Ops/sec
sum with for of loop 9490.2 Ops/sec
sum with for loop 118.9 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • _.sumBy value

  • map and reduce

  • _.sumBy with map

  • sum with for of loop

  • sum with for loop