RFR: 8327964: Simplify BigInteger.implMultiplyToLen intrinsic [v2]

Yudi Zheng yzheng at openjdk.org
Tue Mar 19 19:06:36 UTC 2024


On Mon, 18 Mar 2024 16:55:28 GMT, Damon Fenacci <dfenacci at openjdk.org> wrote:

> Quite a simplification! Have you checked if there are any performance differences?

Ran https://github.com/oracle/graal/blob/master/compiler/src/org.graalvm.micro.benchmarks/src/micro/benchmarks/BigIntegerBenchmark.java
The results are

$ before change
Benchmark                                 Mode  Cnt    Score   Error  Units
BigIntegerBenchmark.bigIntMontgomeryMul  thrpt    5  122.488 ± 0.130  ops/s
BigIntegerBenchmark.bigIntMontgomerySqr  thrpt    5   76.023 ± 0.106  ops/s
BigIntegerBenchmark.bigIntMul            thrpt    5  330.130 ± 0.349  ops/s
BigIntegerBenchmark.bigIntMulAdd         thrpt    5  455.590 ± 0.663  ops/s

$ after change
Benchmark                                 Mode  Cnt    Score   Error  Units
BigIntegerBenchmark.bigIntMontgomeryMul  thrpt    5  124.407 ± 0.045  ops/s
BigIntegerBenchmark.bigIntMontgomerySqr  thrpt    5   76.036 ± 0.232  ops/s
BigIntegerBenchmark.bigIntMul            thrpt    5  329.836 ± 0.953  ops/s
BigIntegerBenchmark.bigIntMulAdd         thrpt    5  456.485 ± 0.766  ops/s

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

PR Comment: https://git.openjdk.org/jdk/pull/18226#issuecomment-2007922439


More information about the core-libs-dev mailing list