JDK-8042355 stream with sorted() causes downstream ops not to be lazy
Mike Duigou
mike.duigou at oracle.com
Mon May 5 16:33:55 UTC 2014
Looks good to me.
On May 5 2014, at 06:16 , Paul Sandoz <paul.sandoz at 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 pipelines does not aggressively push all sorted elements downstream if the pipeline is known to be short-circuiting.
>
> Note that it is not an error that more elements, than strictly required to produce a result, may flow through the pipeline. This can occur, in general (not restricted to just sorting), for short-circuiting parallel pipelines.
>
> Paul.
>
>
More information about the core-libs-dev
mailing list