Casting reference array to any-T array.

Vitaly Davidovich vitalyd at gmail.com
Thu Jan 8 01:39:01 UTC 2015


I don't think we need specialization for this, just reification.
Specialization would help what Mike was talking about (at the cost of bloat
if not controlled somehow).

Sent from my phone
On Jan 7, 2015 8:21 PM, "Richard Warburton" <richard.warburton at gmail.com>
wrote:

> Hi,
>
> > The current functionality continues with the erasure plan.  However, I
>> > wouldn't mind doing better!
>>
>>
>> Yeah, I can't immediately think of a critical reason why it can't stay
>> erased.  For JIT optimizer, having a narrower upper bound on the type may
>> make its life easier, although I don't know if it'll have any material
>> difference.
>>
>
> At the moment a lot of collection classes have checkcast overhead on
> reads. For example List.get() or Map.get() both end up checkcasting their
> return value IIRC. Specialising the ref implementation gives you the
> opportunity to remove this checkcast.
>
> regards,
>
>   Richard Warburton
>
>   http://insightfullogic.com
>   @RichardWarburto <http://twitter.com/richardwarburto>
>


More information about the valhalla-dev mailing list