JDK-8042355 stream with sorted() causes downstream ops not to be lazy
fweimer at redhat.com
Tue May 6 09:30:25 UTC 2014
On 05/05/2014 03:16 PM, Paul Sandoz wrote:
> 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.
Would it be possible to use something like heap sort to avoid sorting
the entire input stream if only the first few smallest items are needed?
Florian Weimer / Red Hat Product Security Team
More information about the core-libs-dev