On Wed, 9 Oct 2024 16:03:05 GMT, fabioromano1 <d...@openjdk.org> wrote:
>> Oh right, `expandBigIntegerTenPowers()` indeed computes and stores a lot of >> values. >> >> I'm thinking of opening an issue to rewrite it to just keep the values that >> are actually computed as intermediate results of a repeated squaring >> implementation. > > @rgiulietti BTW of opening new issues, I've found that there are some > optimizations and code simplifications that can be done in `BigInteger`'s bit > operations that uses lowest non-zero word search, like `shiftRight()`, > `getLowestSetBit()`, `bitLength()` and `bitCount()`. If you are interested, you can create new PRs without reference to JBS issues, and I'll file them. As usual, it's easier for review purposes when each PR touches only small groups of strongly related changes rather than big modifications en-bloc. But you should show JMH benchmark evidence in later comments (not the introductory comment) that there are no performance regressions, in addition to code simplification. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21323#discussion_r1793809261