Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
lodash partition + concat vs two filter loops
(version: 1)
Comparing performance of:
lodash partition + concat vs double filter
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 tabl = Array.from({ length: 10000 }).map((value, i) => i)
Tests:
lodash partition + concat
const [a, b] = _.partition(tabl, e => e % 2) const res = a.concat(b);
double filter
const res = [...tabl.filter(e => e % 2), ...tabl.filter(e => !e % 2)]
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
lodash partition + concat
double filter
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Browser/OS:
Chrome 131 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
lodash partition + concat
14560.3 Ops/sec
double filter
27503.9 Ops/sec
Related benchmarks:
lodash partition vs forEach with array push vs two filter loops
lodash partition vs reduce with array push vs two filter loops
lodash partition vs find and filter
Lodash partition vs Reduce vs 2 Filter
Unshift value in array - Lodash partition vs Reduce vs 2 Filter
loadash vs 2 filters
lodash partition vs for loop
lodash partition vs forEach with array spread iterator vs array push vs for each with concat vs two filters
lodash partition vs forEach with array spread iterator vs array push vs for each with concat vs two filters with 10000
Comments
Confirm delete:
Do you really want to delete benchmark?