8026049: (bf) Intrinsify ByteBuffer.put{Int, Double, Float, ...} methods

David Holmes david.holmes at oracle.com
Mon Mar 16 00:40:20 UTC 2015


Andrew,

Experimental options are supposed to be opt-in only via 
UnlockExperimentalVMOptions. You presently have the experimental 
UseUnalignedAccesses being turned on unconditionally on those 
architectures that support it.

David

On 14/03/2015 4:47 AM, Andrew Haley wrote:
> I've tried to address all the points that have been made.
>
> I haven't changed the way the sub-words are read and written because
> the code I'm seeing is fairly nearly optimal right now and anything
> more complex runs the risk of tripping inlining limits, thus
> pessimizing performance.  We need a general solution which isn't
> optimized for special cases but is decent on average and often very
> good.  I think it's close to the best compromise we're going to get.
>
> I have changed the javadoc as requested and I have fixed the code in
> HeapByteBuffer so that it doesn't check the index twice for floating-
> point put() and get() operations.
>
> I have added a jtreg test for HeapByteBuffer which tests it pretty
> thoroughly.  It also, as a consequence, tests the underlying Unsafe
> methods.  I wasn't sure what a separate test for the Unsafe methods
> would achieve so I didn't write one.
>
> OK?
>
> http://cr.openjdk.java.net/~aph/unaligned.hotspot.6/
> http://cr.openjdk.java.net/~aph/unaligned.jdk.6/
>
> Andrew.
>



More information about the core-libs-dev mailing list