Hi Claes,

> For example, returning Spliterators.emptySpliterator() and
> Collections.singletonSpliterator when appropriate *sounds* like nice little
> optimizations, but Arrays.spliterator(T[]) with an empty or single-element 
> array
> appears to be relatively cheap operations, whereas mixing implementation could
> make call-sites accepting List.of(foo).spliterator() become megamorphic.
> 
> Thus I think these should be done independently as a follow-up, along with
> tests and microbenchmarks.

I’m fine with it. The most important part is that you now aware of this problem
and I’m sure that you would provide the best possible solution. :-)

Best regards,
Andrej Golovnin

Reply via email to