-
Notifications
You must be signed in to change notification settings - Fork 210
Closed
Description
The various Collection (and Collections of Map (keySet(), etc)) implementations don't appear to override spliterator(). This means they will inherit the quite inefficient generic default implementations from List, Set, etc. This makes using stream() operations potentially quite inefficient.
Many of the types can abuse the internals of the collection to work much faster.
I get that the stream() (currently the only real user of Spliterators) on anything other then Object, int, long, and double Collections are going to involve either a boxing or a casting (due to only those 3 primitives being "recognized" by java.util.stream, and Object being Object), but for these four cases it would be nice to have.
Metadata
Metadata
Assignees
Labels
No labels