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

Paul Sandoz paul.sandoz at oracle.com
Mon Mar 16 10:03:25 UTC 2015


I am running this patch though our JPRT test system right now.

The test looks good, two comments on it:

- IMO it does not need the internal PRNG FastRandom, SplittableRandom can be used instead.

- I suspect that test needs to be located in the hotspot test area, which likely means it gets run on more "exotic" platforms. Perhaps someone with more knowledge of the test configuration and infrastructure can comment?

Paul.

On Mar 13, 2015, at 7:47 PM, Andrew Haley <aph at redhat.com> 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