Spliterator flags as enum (was Initial java.util.Spliterator putback)

Paul Sandoz paul.sandoz at oracle.com
Fri Mar 29 07:45:16 PDT 2013

On Mar 29, 2013, at 5:39 AM, Paul Benedict <pbenedict at apache.org> wrote:
> I think the use of EnumSet in a public API is superior to bit flags.
> Worrying about the number of bytes here is not important since they will
> all end up being garbage collected when the stream processing ends.

I worry.

We need to reduce the fixed costs of setting up the pipeline so using streams are not unduly expensive compared to a for loop using an equivalent lambda. Fixed costs are especially noticeable for small data sizes e.g. < 10.

We are currently working on refactoring the internals to further reduce fixed costs.


More information about the lambda-dev mailing list