Hello Stuart, I think this patch is a reasonable enhancement to eliminate a performance bottleneck from the default `Collection.spliterator` implementation caused by its assumption that Collection.size is a cheap call, by using an unknown size spliterator instead.
This approach has the drawback that the spliterator returned is now early-binding instead of late-binding. To preserve behavioral compatibility, I proposed to also update Collection.stream to remain late-binding. I hope you can take a look at this patch, or even a quick evaluation of the current approach and whether the early/late binding effects are acceptable would be extremely valuable. Regards, Chen On Wed, Apr 29, 2026 at 12:58 AM Gillespie, Oli <[email protected]> wrote: > > Hi, > > I'm looking for one more reviewer for a small change to improve performance > of TreeMap sub-map spliterators - https://github.com/openjdk/jdk/pull/28608. > I have one reviewer but they requested 2 total. Starting a new thread in case > everyone is ignoring the existing PR thread assuming it's already handled, > hope that's okay. > > Thanks, > > Oliver > > > > Amazon Development Centre (London) Ltd. Registered in England and Wales with > registration number 04543232 with its registered office at 1 Principal Place, > Worship Street, London EC2A 2FA, United Kingdom. > >
