[9] RFR (M): 8050877: Improve code for pairwise argument conversions and value boxing/unboxing

Paul Sandoz paul.sandoz at oracle.com
Sun Jul 20 20:02:32 UTC 2014

On Jul 18, 2014, at 4:02 AM, Vladimir Ivanov <vladimir.x.ivanov at 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.



More information about the core-libs-dev mailing list