I've submitted a couple of RFEs to support some simple optimizations on 
Streams.  I noticed both issues while writing some code that forced me to 
choose between cluttering up my straightforward, uniform Stream logic and 
eating the cost of linear operations that should be O(1).

JDK-8067969 Optimize Stream.count for SIZED Streams
JDK-8067971 Support optimizations for always-true and always-false Predicates

Certainly not high-priority, but would be nice for somebody working with 
java.util.stream to address someday.

—Dan

Reply via email to