early steps on the road to customization
John Rose
john.r.rose at oracle.com
Fri Aug 28 22:12:54 UTC 2020
Very tasty, thank you!
Here’s a discussion of the issue with CV::remove:
https://bugs.openjdk.java.net/browse/JDK-8238260
On Aug 28, 2020, at 5:53 AM, Peter Levart <peter.levart at gmail.com> wrote:
>
> 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