Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
filter + map vs reduce 1234567235235
(version: 0)
Comparing performance of:
flatMap vs reduce
Created:
3 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var values = [] for(i=0; i<100000; i++){ values.push([i, i]) }
Tests:
flatMap
values.flatMap(e => e> 50 ? [e, e * 2] : [])
reduce
values.reduce((acc, x) => { if (x > 50) acc.concat([x, x * 2]); return acc; }, [])
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
flatMap
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-map vs reduce
filter-map vs reduce 2
filter + map vs reduce 123
filter + map vs reduce 12345
filter + map vs reduce 12345153
Comments
Confirm delete:
Do you really want to delete benchmark?