review request (L): 7030453: JSR 292 ClassValue.get method is too slow
Rémi Forax
forax at univ-mlv.fr
Sun Dec 4 14:13:39 PST 2011
On 12/04/2011 08:38 PM, Joe Darcy wrote:
> Hi John,
>
> Are there alternatives to adding two new fields to java.lang.Class? I
> assume most Class'es won't have ClassValue information associated with
> them.
>
> -Joe
If you use Groovy, JRuby or Nashorn in your code, all visible classes
will use this two fields.
Any alternative will slow down the access to the class value.
BTW, if we had to remove some fields, I vote for moving all fields
related to the reflection
in a delegate class. Looking up for members is slow so most of the code
that call reflection
methods use their own cache, so the performance impact will be small in
my opinion
(I have no data to prove that :)
Rémi
More information about the hotspot-compiler-dev
mailing list