Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Sum vs Reduce
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Browser:
Chrome 120
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
javascript reduce
303K/s
lodash sum
297K/s
View exact numbers
Test name
Executions per second
✓
javascript reduce
302,771 Ops/sec
lodash sum
296,797 Ops/sec
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Tests:
lodash sum
const tabs = [100, 200, 300, 400, 500]; console.log( _.sum(tabs) );
javascript reduce
const tabs = [100, 200, 300, 400, 500]; console.log( tabs.reduce((a,b) => a+b) );