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

PPC64: optimize byte reverse code for int value

    XMLWordPrintable

Details

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

    Description

      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

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: