-
Enhancement
-
Resolution: Fixed
-
P4
-
16
-
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)
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)