Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Lodash reduce vs native (testing)
This test aims to compare lodash reduce function with the Javascript native reduce function, doing exactly the same operation
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.2 Safari/605.1.15
Browser:
Safari 26
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
2 months ago
Test name
Executions per second
Native reduce
1361607.1 Ops/sec
Lodash reduce
1268212.0 Ops/sec
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
var nbLength = 100000000 //100M var numbers = []; for (var i = 0; i <= nbLength; i++) { numbers.push(i); }
Tests:
Native reduce
//numbers.reduce((sum, n) => sum + n, 0) console.log('a')
Lodash reduce
//_.reduce(numbers, (sum, n) => sum + n, 0) console.log('b')