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

AArch64: Implement BigInteger shiftRight and shiftLeft accelerator/intrinsic

XMLWordPrintable

    • b22
    • aarch64

      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)

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

              Created:
              Updated:
              Resolved: