RFR: 8356891: Some code simplifications for basic BigIntegers' bit operations [v11]

Raffaello Giulietti rgiulietti at openjdk.org
Tue May 20 14:11:57 UTC 2025


On Tue, 20 May 2025 13:20:10 GMT, fabioromano1 <duke at openjdk.org> wrote:

>> Some changes in `Biginteger`s' bit operations that increase the code readability and slightly optimize the execution time.
>
> fabioromano1 has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Removed redundant code for choosing division's algorithm logic

The last commit about `divide` is a bit out of scope. While it is simple, I suggest deferring it to another PR.

I've long planned a reorganization of `BigInteger`s implementation to shift the heavy-lifting work to `MutableBigInteger` (in particular, the multiplication algorithms) and leave `BigInteger` as a simple wrapper of `MutableBigInteger` (the thinner, the better). The `divide` simplifications could be part of that work.

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

PR Comment: https://git.openjdk.org/jdk/pull/25166#issuecomment-2894578950


More information about the core-libs-dev mailing list