Joshua Bloch in <Effective Java> (Third Edition)
mentions that
The operations performed by Stream’s collect method, which are known as mutable reductions, are not good candidates for parallelism because the overhead of combining collections is costly.
I read the docs on Mutable reduction, but I am still not quite sure why reduction is not a good candidate for parallelism. Is it the synchronization
?
As @Ravindra Ranwala points out (I also saw this on the Reduction, concurrency, and ordering docs):
It may actually be counterproductive to perform the operation in parallel. This is because the combining step (merging one Map into another by key) can be expensive for some Map implementations.
If so, then are there other major factors we need to care about that might result in low performance?