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 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

Reply via email to