[riscv-port] RFR: 8279292: riscv: Intrinsify multiplyToLen and squareToLen

Feilong Jiang fjiang at openjdk.java.net
Mon Dec 27 08:31:11 UTC 2021


On behalf of Taiping Guo (guotaiping1 at huawei.com)

BigInteger intrinsic: MultiplyToLen and SquareToLen intrinsic are missed in current vm. They should be implemented.
The JMH tests show that the MultiplyToLen intrinsic improve the performance by up to 2x ~ 3x and the SquareToLen intrinsic improve the performance by up to 1.8x ~ 2x when the length of BigInteger changed from 1 to 5000, compared with that of C2.

JMH tests and results on D1 and Unmatched list as follows:
[MyBenchmark.txt](https://github.com/openjdk/riscv-port/files/7779255/MyBenchmark.txt)

[squareToLen_unmatched.txt](https://github.com/openjdk/riscv-port/files/7779247/squareToLen_unmatched.txt)
[squareToLen_d1.txt](https://github.com/openjdk/riscv-port/files/7779248/squareToLen_d1.txt)
[multiplyToLen_unmatched.txt](https://github.com/openjdk/riscv-port/files/7779249/multiplyToLen_unmatched.txt)
[multiplyToLen_d1.txt](https://github.com/openjdk/riscv-port/files/7779250/multiplyToLen_d1.txt)

-------------

Commit messages:
 - 8279292: riscv: Intrinsify multiplyToLen and squareToLen

Changes: https://git.openjdk.java.net/riscv-port/pull/38/files
 Webrev: https://webrevs.openjdk.java.net/?repo=riscv-port&pr=38&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8279292
  Stats: 589 lines in 4 files changed: 589 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/riscv-port/pull/38.diff
  Fetch: git fetch https://git.openjdk.java.net/riscv-port pull/38/head:pull/38

PR: https://git.openjdk.java.net/riscv-port/pull/38


More information about the riscv-port-dev mailing list