ParallelStream Vs Stream Digest, Vol 113, Issue 94

David Holmes david.holmes at oracle.com
Fri Sep 30 04:37:55 UTC 2016


On 30/09/2016 2:24 PM, Prakhar Makhija wrote:
> Hi everyone,
>
> I have started using both Stream and ParallelStream, for Set List and Entry
> of Map.
>
> What I can't understand is why Stream is taking lesser time than
> ParallelStream.
>
> Shouldnt ParallelStream be giving better performance than Stream in terms
> of Time Complexity?

Depends on the data set size and your hardware, and what exactly you are 
trying to do in parallel.

David


More information about the core-libs-dev mailing list