Unsafe.{get,put}-X-Unaligned performance (original) (raw)

Vitaly Davidovich vitalyd at gmail.com
Wed Mar 11 17:41:01 UTC 2015


Also,

static boolean unaligned() { 595 if (unalignedKnown) 596 return unaligned; 597 unaligned = unsafe.unalignedAccess();

598 unalignedKnown = true; 599 return unaligned; 600 }

I don't think we need this unalignedKnown dance anymore -- just return unsafe.unalignedAccess() there?

On Wed, Mar 11, 2015 at 1:39 PM, Andrew Haley <aph at redhat.com> wrote:

On 03/11/2015 05:38 PM, Vitaly Davidovich wrote: > private static final ByteOrder byteOrder > 571 = unsafe.isBigEndian() ? ByteOrder.BIGENDIAN : ByteOrder.LITTLEENDIAN; > 572 > 573 static ByteOrder byteOrder() { > 574 if (byteOrder == null) > 575 throw new Error("Unknown byte order"); > 576 return byteOrder; > 577 } > 578 > > No need for null check in byteOrder() anymore, right?

OK, thx. Andrew. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20150311/3b55e685/attachment.html>



More information about the hotspot-compiler-dev mailing list