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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Browser:
Chrome 143
Operating system:
Windows
Device Platform:
Desktop
Date tested:
3 months ago
Test name
Executions per second
Native reduce
387961.4 Ops/sec
Lodash reduce
359143.3 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')