Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
native lodash filter map 2dsfg
(version: 0)
Comparing performance of:
native lodash filter map vs Lazy Lodash filter-map vs lodash reduce vs native reduce
Created:
5 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.4/lodash.min.js"></script>
Script Preparation code:
var data = Array(1000000).fill({ filtering: true, mapping: 42 });
Tests:
native lodash filter map
data.filter(({ filtering }) => filtering).map(({ mapping }) => mapping)
Lazy Lodash filter-map
_.map(_.filter(data, 'filtering'), 'mapping')
lodash reduce
_.reduce(data, function(result, value, key) { if (value.filtering) { result.push(value.mapping) } return result; }, [])
native reduce
data.reduce(function(result, value, key) { if (value.filtering) { result.push(value.mapping) } return result; }, [])
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
native lodash filter map
Lazy Lodash filter-map
lodash reduce
native reduce
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:
Filter: Lodash vs Native
lodash v native filter
native lodash filter map 2
Filter: Lodash 2 vs Native
Map: Lodash vs Native
Comments
Confirm delete:
Do you really want to delete benchmark?