PPC64: optimize byte reverse code for int value

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Won't Fix
    • Priority: P4
    • tbd
    • Affects Version/s: 10
    • Component/s: 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

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

              Created:
              Updated:
              Resolved: