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

Feilong Jiang fjiang at openjdk.java.net
Wed Dec 29 02:18:16 UTC 2021


> 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.
> 
> Full jtreg tests on qemu and hotspot/jdk tier1 test on Unmathced are passed without new failures.
> 
> 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)

Feilong Jiang has updated the pull request incrementally with one additional commit since the last revision:

  use 32-bit instructions to deal with length and index operations

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

Changes:
  - all: https://git.openjdk.java.net/riscv-port/pull/38/files
  - new: https://git.openjdk.java.net/riscv-port/pull/38/files/ae5180aa..aca73fbe

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=riscv-port&pr=38&range=05
 - incr: https://webrevs.openjdk.java.net/?repo=riscv-port&pr=38&range=04-05

  Stats: 31 lines in 1 file changed: 1 ins; 0 del; 30 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