early steps on the road to customization

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


Hi,

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:

https://github.com/plevart/valhalla/pull/1

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

https://gist.github.com/plevart/3ddada53824faede66e843acd0dfa92f

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