RFR: 8336274: MutableBigInteger.leftShift(int) optimization [v5]

Sergey Kuksenko skuksenko at openjdk.org
Tue Sep 3 14:06:22 UTC 2024


On Mon, 2 Sep 2024 16:19:01 GMT, fabioromano1 <duke at openjdk.org> wrote:

>> This implementation of MutableBigInteger.leftShift(int) optimizes the current version, avoiding unnecessary copy of the MutableBigInteger's value content and performing the primitive shifting only in the original portion of the value array rather than in the value yet extended with trailing zeros.
>
> fabioromano1 has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
> 
>  - Merge branch 'openjdk:master' into patchLeftShift
>  - Code more clear
>  - Tests changes
>  - Merge branch 'openjdk:master' into patchLeftShift
>  - Removed trailing whitespace
>  - MutableBigInteger.leftShift(int) optimization

It would be nice to see some benchmarks where it gives performance benefits.

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

PR Comment: https://git.openjdk.org/jdk/pull/20008#issuecomment-2326612409


More information about the core-libs-dev mailing list