Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Lodash Chain vs Native (with &&) vs Native (without &&) vs Flow, with actual filtering
(version: 0)
Comparing performance of:
Chain vs Native (with &&) vs Native (without &&) vs Flow
Created:
2 years 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 src='https://cdn.jsdelivr.net/g/lodash@4(lodash.min.js+lodash.fp.min.js)'></script>
Script Preparation code:
var fp = _.noConflict(); var data = Array(10000000).fill({ a: 'a', b: 1 });
Tests:
Chain
_.chain(data).filter(f => f.a === 'a').filter(f => f.b === 1).filter(f => f.b + 1 === 3).map(f => f.a).filter(f => f === 'a').value()
Native (with &&)
data.filter(f => f.a === 'a' && f.b === 1 && f.b + 1 === 3).map(f => f.a).filter(f => f === 'a')
Native (without &&)
data.filter(f => f.a === 'a').filter(f => f.b === 1).filter(f => f.b + 1 === 3).map(f => f.a).filter(f => f === 'a')
Flow
fp.flow( fp.filter(f => f.a === 'a'), fp.filter(f => f.b === 1), fp.filter(f => f.b + 1 === 3), fp.map(f => f.a), fp.filter(f => f === 'a') )(data)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
Chain
Native (with &&)
Native (without &&)
Flow
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
Lodash Chain vs Native (with &&) vs Native (without &&) vs Flow
Lodash Chain vs Native (with &&) vs Native (without &&) vs Flow with random data
Lodash Chain (with &&) vs Native (with &&) vs Native (without &&) vs Flow
Lodash Chain vs Native vs Flow
Comments
Confirm delete:
Do you really want to delete benchmark?