Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Chrome 122
Windows
Desktop
8 months ago
Test name Executions per second
_.sumBy value 1129.0 Ops/sec
map and reduce 2229.5 Ops/sec
_.sumBy with map 964.1 Ops/sec
sum with for of loop 11168.5 Ops/sec
sum with for loop 116.0 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