RFR: 8281259: MutableBigInteger subtraction could be simplified
Brian Burkhalter
bpb at openjdk.java.net
Thu Feb 10 20:48:05 UTC 2022
On Fri, 4 Feb 2022 10:13:28 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:
> The proposed form of borrow bit handling is [already used in BigInteger class](https://github.com/djelinski/jdk/blob/ce26a19be5e907c11164b46f1bcb370b534d5bf6/src/java.base/share/classes/java/math/BigInteger.java#L1558).
>
> JMH results without the patch:
>
> Benchmark (maxNumbits) Mode Cnt Score Error Units
> BigIntegers.testGcd 256 avgt 25 3181205,367 ± 155272,427 ns/op
>
> JMH results with the patch applied:
>
> Benchmark (maxNumbits) Mode Cnt Score Error Units
> BigIntegers.testGcd 256 avgt 25 2696030,849 ± 14141,940 ns/op
Thanks for the update. Approved.
-------------
Marked as reviewed by bpb (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/7342
More information about the core-libs-dev
mailing list