Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Bench flat map vs spread reduce (small array)
(version: 1)
Comparing performance of:
spread vs flatmap
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
var arr = Array(50).fill([0,0,0])
Tests:
spread
arr.reduce((acc, item) => { acc.push(...item); return acc; }, []);
flatmap
arr.flatMap((item) => { return item; });
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
spread
flatmap
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:133.0) Gecko/20100101 Firefox/133.0
Browser/OS:
Firefox 133 on Mac OS X 10.15
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
spread
751182.5 Ops/sec
flatmap
685039.6 Ops/sec
Related benchmarks:
reduce vs flatMap vs map test
reduce vs flatMap test
reduce vs flatMap test2
flatMap vs reduce using push spread
Bench flat map vs spread reduce
Reduce vs flatMap performance
flatMap vs reduce without spread
flatMap vs reduce Saran
Bench flat map vs spread reduceqwe
Comments
Confirm delete:
Do you really want to delete benchmark?