[10] RFR(M): 8176506: C2: loop unswitching and unsafe accesses cause crash

Andrew Haley aph at redhat.com
Thu Apr 20 13:28:02 UTC 2017


On 20/04/17 14:06, Roland Westrelin wrote:
> 
>> But the real goal of that ByteBuffer test (and indeed all of the
>> ByteBuffer optimizations) is to provide access to raw memory "as fast
>> as C", and has implications for project Valhalla, etc.
> 
> In the case of the ByteBuffer test, with the changes I'm proposing there
> will be an extra null check to verify accesses are on heap. That null
> check will be out of loop so essentially free and there won't be any
> regression. Off heap accesses or a mix of on heap and off heap accesses
> in the same method would regress.

A lot of people need off-heap ByteBuffers to be really fast.  This is
important for Lucene, big data, etc.  So we must be careful.

Andrew.



More information about the hotspot-compiler-dev mailing list