vigna / fastutil

fastutil extends the Java™ Collections Framework by providing type-specific maps, sets, lists and queues.
Apache License 2.0
1.8k stars 197 forks source link

Document effecient spliterator for a RandomAccess AbstractList #218

Closed techsy730 closed 3 years ago

techsy730 commented 3 years ago

AbstractList gives a mostly effecient spliterator for RandomAccess subclasses. While subclasses can certainly do better by abusing internals, this one won't display the terrible splitting performance that the Iterator based one from the root List interface does.

We should document this fact (and make it an assurance) so subclassers don't feel obligated to write their own Spliterator to not get terrible parallel performance.

Also make the spliterator late-binding, bringing them into line with the default implementations in the List and BigList classes.

Same for AbstractBigList.