Re: ParallelStream Vs Stream Digest, Vol 113, Issue 94

2016-10-01 Thread Prakhar Makhija
Thanks for the material. I was looking forward to watch/read more about it in detail. On Oct 1, 2016 5:21 AM, "Stuart Marks" wrote: > > > On 9/30/16 12:41 PM, John Rose wrote: > >> On Sep 29, 2016, at 11:39 PM, Louis Wasserman >> wrote: >> >>>

Re: ParallelStream Vs Stream Digest, Vol 113, Issue 94

2016-09-30 Thread Stuart Marks
On 9/30/16 12:41 PM, John Rose wrote: On Sep 29, 2016, at 11:39 PM, Louis Wasserman wrote: You should absolutely not assume parallel streams are faster than sequential streams. http://gee.cs.oswego.edu/dl/html/StreamParallelGuidance.html

Re: ParallelStream Vs Stream Digest, Vol 113, Issue 94

2016-09-30 Thread John Rose
On Sep 29, 2016, at 11:39 PM, Louis Wasserman wrote: > > You should absolutely not assume parallel streams are faster than > sequential streams. > http://gee.cs.oswego.edu/dl/html/StreamParallelGuidance.html >

Re: ParallelStream Vs Stream Digest, Vol 113, Issue 94

2016-09-30 Thread Louis Wasserman
You should absolutely not assume parallel streams are faster than sequential streams. http://gee.cs.oswego.edu/dl/html/StreamParallelGuidance.html is pretty much the iconic document on that subject, and explains circumstances under which parallelism is good, and when it is likely to be harmful.

Re: ParallelStream Vs Stream Digest, Vol 113, Issue 94

2016-09-29 Thread David Holmes
On 30/09/2016 3:07 PM, Prakhar Makhija wrote: The application makes a hit to a core object over and over again. I have to copy this object, i.e. make a clone of it using the Cloneable interface, so that the original object cannot be modified. But since the references of the old object and clone

Re: ParallelStream Vs Stream Digest, Vol 113, Issue 94

2016-09-29 Thread Prakhar Makhija
The application makes a hit to a core object over and over again. I have to copy this object, i.e. make a clone of it using the Cloneable interface, so that the original object cannot be modified. But since the references of the old object and clone object would be intact, inside the clone method

Re: ParallelStream Vs Stream Digest, Vol 113, Issue 94

2016-09-29 Thread David Holmes
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

ParallelStream Vs Stream Digest, Vol 113, Issue 94

2016-09-29 Thread Prakhar Makhija
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? On Sep 30, 2016 12:53