Casting reference array to any-T array.
richard.warburton at gmail.com
Thu Jan 8 01:21:33 UTC 2015
> 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
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.
More information about the valhalla-dev