VarHandle instance methods performance
Frank Yuan
frank.yuan at oracle.com
Wed Apr 24 10:11:11 UTC 2019
> On 4/24/19 11:51 AM, Frank Yuan wrote:
> > My test code is as below:
> > ...
> > final VarHandle vhf;
> > final VarHandle vhvf;
> > ...
>
> Make these two "static final", initialize them in class initializer, then try again.
>
> VarHandle (like Atomic*FieldUpdaters, MethodHandle, etc), have internal checks that can only be
> folded away when the VH/MH/A*FU instance is constant.
>
Thank you, it works!
YC
> -Aleksey
More information about the core-libs-dev
mailing list