Re: JDK-8042355 stream with sorted() causes downstream ops not to be lazy

2014-05-06 Thread Florian Weimer
On 05/05/2014 03:16 PM, Paul Sandoz wrote: Hi, https://bugs.openjdk.java.net/browse/JDK-8042355 http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8042355-sorted-short-circuit/webrev/ This is an optimization to ensure that sorted() in sequential pipelines does not aggressively push all

Re: JDK-8042355 stream with sorted() causes downstream ops not to be lazy

2014-05-06 Thread Paul Sandoz
On May 6, 2014, at 11:30 AM, Florian Weimer fwei...@redhat.com wrote: On 05/05/2014 03:16 PM, Paul Sandoz wrote: Hi, https://bugs.openjdk.java.net/browse/JDK-8042355 http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8042355-sorted-short-circuit/webrev/ This is an optimization to ensure

Re: JDK-8042355 stream with sorted() causes downstream ops not to be lazy

2014-05-06 Thread Brian Goetz
This is an optimization that is theoretically possible (and was anticipated in the design), but in reality is likely to be so low-priority that it would be a really long time before it was worth putting engineering resources on this. It would have to be an unordered stream, and we'd have to

JDK-8042355 stream with sorted() causes downstream ops not to be lazy

2014-05-05 Thread Paul Sandoz
Hi, https://bugs.openjdk.java.net/browse/JDK-8042355 http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8042355-sorted-short-circuit/webrev/ This is an optimization to ensure that sorted() in sequential pipelines does not aggressively push all sorted elements downstream if the pipeline is known

Re: JDK-8042355 stream with sorted() causes downstream ops not to be lazy

2014-05-05 Thread Mike Duigou
Looks good to me. On May 5 2014, at 06:16 , Paul Sandoz paul.san...@oracle.com wrote: Hi, https://bugs.openjdk.java.net/browse/JDK-8042355 http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8042355-sorted-short-circuit/webrev/ This is an optimization to ensure that sorted() in sequential