Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Lodash partition VS native reduce (updated 2)
(version: 1)
Comparing performance of:
Lodash vs Native reduce
Created:
one year ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
var arr = []; for (i = 0; i < 1000; i++) { arr[i] = i; }
Tests:
Lodash
var [met, rest] = _.partition(arr, function(i) { return i % 2 === 0 });
Native reduce
var [met, rest] = arr.reduce(function(res, i) { if (i % 2 === 0) { res[0].push(i) } else {res[1].push(i) } return res }, [[], []])
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Lodash
Native reduce
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Browser/OS:
Chrome 133 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Lodash
400781.9 Ops/sec
Native reduce
488159.8 Ops/sec
Related benchmarks:
wefgsdgsdg
Lodash partition VS native reduce
reduce native vs lodash
Lodash vs Native reduce - 2020 test
lodashasfsadf
Lodash partition VS loop
Chunks (2023.2)
Lodash partition VS native reduce (with Lodash actually loaded)
Lodash partition VS native reduce (updated)
Comments
Confirm delete:
Do you really want to delete benchmark?