Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8073093

AARCH64: C2 generates poor code for ByteBuffer accesses

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • None
    • None
    • hotspot
    • None

      java.​nio.​DirectByteBuffer.getXXX is slow for types larger than byte because the runtime does not know that AArch64 can perform unaligned memory accesses.

      The problem is due to this code in java.nio.Bits.unaligned():

              unaligned = arch.equals("i386") || arch.equals("x86")
                  || arch.equals("amd64") || arch.equals("x86_64");

      If we add AArch64 to this list code quality is very much improved.

      It would be better if OpenJDK had one global file where the properties of the target system could be set rather than scattered in this way.

            aph Andrew Haley
            aph Andrew Haley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: