Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
flatMap vs reduce 9999
(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<1000; i++){ values.push([i, i]) }
Tests:
flatmap
values.flatMap(e => e.map(i => i * 2))
reduce
values.reduce((acc, x) => { acc.push(x[0], x[1]*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:
flatMap vs reduce test
flatMap vs reduce test 2
flatMap vs reduce test 3
Reduce Push vs. flatMap with subarrays
flatMap vs reduce (push)
Comments
Confirm delete:
Do you really want to delete benchmark?