_.sumBy vs map and reduceFastest: map and reduce (1.7x faster)
1,974 ops/sec
1,196 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| _.sumBy | |
| map and reduce |
| Test name | Executions per second |
|---|---|
| ✓ _.sumBy | 2,370 Ops/sec |
| map and reduce | 1,812 Ops/sec |