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
Go 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
spread
751K/s
flatmap
685K/s
View exact numbers
Test name
Executions per second
✓
spread
751,182 Ops/sec
flatmap
685,040 Ops/sec
Related benchmarks
Bench flat map vs spread reduce
flatMap vs reduce Saran
Bench flat map vs spread reduceqwe
Comments
Confirm delete:
Do you really want to delete benchmark?