early steps on the road to customization

Peter Levart peter.levart at gmail.com
Fri Aug 28 12:53:22 UTC 2020


On 8/27/20 11:52 PM, John Rose wrote:
> The effects of each factor can be estimated by appropriate experiments:
> - use a ClassValue approximator that the JIT can constant-fold

...here's a quick hack that makes the 1st N (32) evaluated ClassValue 
instances constant-foldable:


I haven't checked the JIT-ed code, but JMH benchmark undoubtedly shows 
that it works:


This patch does not support ClassValue.remove operation. Interesting 
question is whether it would be possible to support remove via some kind 
of MethodHandle/de-opt trickery (Rémi would know).

Regards, Peter

More information about the valhalla-dev mailing list