Places we should use the new ByteBuffer intrinsics (original) (raw)

Andrew Haley aph at redhat.com
Thu Apr 16 10:56:01 UTC 2015


We discussed where we should be using the new Unsafe unaligned intrinsics.

I found these:

ByteBufferAs$Type$Buffer.  These use slow bytewise accesses,
and should be converted.

    DirectByteBuffer.  This probes for unaligned memory support
    and uses byte-by-byte accesses if it isn't available.  We
    should probably convert it after doing some performance
    measurements.

    sun.security.provider.ByteArrayAccess.  This uses a lot of
    hand-carved custom code to handle data which largely
    duplicates that now in Unsafe, but big-endian platforms (and
    little-endian ones which don't support unaligned accesses)
    always use byte-by-byte accesses for unaligned data.  Again,
    we should probably convert it after doing some performance
    measurements.

Andrew.



More information about the hotspot-dev mailing list