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
Go 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
double filter
28K/s
lodash partition + concat
15K/s
View exact numbers
Test name
Executions per second
✓
double filter
27,504 Ops/sec
lodash partition + concat
14,560 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 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?