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:
7 months ago
Lodash reduce
297K/s
Native reduce
291K/s
View exact numbers
Test name
Executions per second
✓
Lodash reduce
296,703 Ops/sec
Native reduce
291,049 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')