Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Bench flatMap vs spread 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(10_000).fill([0,0,0])
Tests:
spread
[...arr];
flatmap
arr.flatMap((item) => 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:
5 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0
Browser/OS:
Chrome 142 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
spread
1490195.5 Ops/sec
flatmap
3163.6 Ops/sec
Related benchmarks:
Reduce Push vs. flatMap
flatMap vs reduce using push spread
Bench flat map vs spread reduce
flatMap vs map/flat
Reduce vs flatMap performance
flatMap vs flat+map
Bench flat map vs spread reduceqwe
flat() vs flatMap()
flatMap vs flat+map 2
flatMap vs map/flat 2
Comments
Confirm delete:
Do you really want to delete benchmark?