On Jul 18, 2014, at 4:02 AM, Vladimir Ivanov <vladimir.x.iva...@oracle.com> 
wrote:
>> ValueConversions
>> 
>> I can see why an EnumMap is used for convenience mapping the Wrapper to MH. 
>> IIUC it means the MH ref values are not @Stable? I guess it would be easy to 
>> unpack into an explicit array and index from the wrapper ordinal, plus then 
>> no additional runtime type checks on the key will be performed for get/put. 
>> Dunno how important that is.
>> 
>> Can UNBOX_CONVERSIONS be marked as @Stable? does that make any difference? 
>> Same for BOX_CONVERSIONS etc.
> All 4 caches in ValueConversions can be marked as @Stable. But it's not 
> performance critical, because they are used only during MethodHandle 
> instantiation, which is expected to be expensive. Performance-wise it make 
> sense to reuse MethodHandles.
> 

Ok.

Paul.

Reply via email to