RFR: 8334755: Asymptotically faster implementation of square root algorithm [v23]

fabioromano1 duke at openjdk.org
Fri Jul 12 14:09:53 UTC 2024


On Fri, 12 Jul 2024 13:07:51 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

>> fabioromano1 has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Added comment on normalization in MutableBigInteger.sqrtRemZimmermann()
>
> src/java.base/share/classes/java/math/MutableBigInteger.java line 2021:
> 
>> 2019:          * the input can be always split in blocks of words without twiddling with bits.
>> 2020:          */
>> 2021:         final int limit = len;
> 
> The name `limit` reminds more an offset than a length.

The solution can be either to change its name, or to use it as an offset, but this second involves to modify the logic of the code, with higher risk of introducing errors.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19710#discussion_r1675984041


More information about the core-libs-dev mailing list