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

AArch64: Implement BigInteger shiftRight and shiftLeft accelerator/intrinsic

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 16
    • Fix Version/s: 16
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      b22
    • CPU:
      aarch64

      Description

      BigInteger is used in binary, cryptography calculation and GNU Multiple Precision Arithmetic Library.

      BigInteger.shiftRightImplWorker and BigInteger.shiftLeftImplWorker are not intrinsified on aarch64 now, which have been done on x86_64.
      We can implement them via USHL NEON instruction (register), which handles four integers one time at most, against just one integer C2 asm-code processed.
      The usage of USHL can be found at: https://developer.arm.com/documentation/dui0801/g/A64-SIMD-Vector-Instructions/USHL--vector-?lang=en

      We tested test/micro/org/openjdk/bench/java/math/BigIntegers.java for performance gain on Kunpeng916 and Kunpeng920 with an initial implementaion.
      The following performance improvements were seen:
      - Intrinsification of BigInteger.shiftLeft: 23.63% (Kunpeng916), 49.77% (Kunpeng920)
      - Intrinsification of BigInteger.shiftRight: 25.69% (Kunpeng916), 34.96% (Kunpeng920)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dongbo Dong Bo
              Reporter:
              dongbo Dong Bo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: