RFR: 8202184: Reduce time blocking the ClassSpecializer cache creating SpeciesData
claes.redestad at oracle.com
Wed Apr 25 08:06:35 UTC 2018
On 2018-04-25 08:36, Peter Levart wrote:
> Hi Claes,
> Nice play with CHM and safe publication.
thanks, I was curious how you'd react to this. :-)
> If findSpecies() is on a hot concurrent path, [...]
It'd be surprising if it was: findSpecies is typically called once for a
and sometimes every now and then during setup of certain method handles
the static speciesData_L* methods in jli.BoundMethodHandle are begging
to be turned
into lazy constants).
Besides, CHM.computeIfAbsent has a non-synchronizing fast-path for when
the key exists,
else if (fh == h // check first node without acquiring lock
&& ((fk = f.key) == key || (fk != null &&
&& (fv = f.val) != null)
.. so I'm not sure we'd gain much from wrapping the preface with a get
even if it was
hot and contended.
More information about the core-libs-dev