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

PPC64: optimize byte reverse code for int value

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • tbd
    • 10
    • hotspot

      We observe a performance bottleneck in byte reversing code in Apache ORC on Tez framework as shown below. We could optimize this typical code by using pattern matching in ppc.ad.

      public float readFloat(InputStream in) throws IOException {
        readFully(in, readBuffer, 0, 4);
        int val = (((readBuffer[0] & 0xff) << 0)
                + ((readBuffer[1] & 0xff) << 8)
                + ((readBuffer[2] & 0xff) << 16)
                + ((readBuffer[3] & 0xff) << 24));
        return Float.intBitsToFloat(val);
      }

      https://github.com/apache/orc/blob/master/java/core/src/java/org/apache/orc/impl/SerializationUtils.java

            horii Hiroshi Horii (Inactive)
            horii Hiroshi Horii (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: