> On Jun 13, 2024, at 8:20 AM, fo...@univ-mlv.fr wrote:
> 
> 
> 
> From: "Viktor Klang" <viktor.kl...@oracle.com>
> To: "Remi Forax" <fo...@univ-mlv.fr>, "core-libs-dev" 
> <core-libs-...@openjdk.java.net>
> Sent: Thursday, June 13, 2024 12:52:03 PM
> Subject: Re: [External] : Gatherer and primitive specialization
> Hi Rémi,
> 
> Given that Collector has not been specialized since it was introduced, we 
> opted to not specialize Gatherer eagerly as Valhalla Value Classes may also 
> move the needle a bit regarding the need for specialization in general.
> 
> As i said previously, most collectors uses collections so until collections 
> are specialized, specializing the collector API is not that useful.
> A gatherer unlike a Collector can just transform values, thus specializing it 
> is more useful.
> 
> For Valhalla, we are at year 10 and value classes are not there yet, 
> specialization of generics is in my opinion 10 years ahead.
> I'm not complaining, if we had rush value classes, everybody will have regret 
> it, but those things take a lot of time.
> 

Also we may benefit from stack flattening with the boxed primitives. I would 
hold off on any such explicit specialization (the pressure on Streams was too 
great, less so for Gatherers IMO). Gatherers may provide a useful way to 
explore the effectiveness of using primitive boxes that don’t have identity.

Paul.   

Reply via email to