RFR: 8341402: BigDecimal's square root optimization [v20]
Raffaello Giulietti
rgiulietti at openjdk.org
Fri Nov 22 14:24:17 UTC 2024
On Tue, 19 Nov 2024 19:48:25 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:
>> Yes, indeed in this case the remainder is always needed, so invoking `workingInt.sqrtAndRemainder()` is faster than checking `!workingInt.equals(sqrt.multiply(sqrt))`, as it avoids the squaring of `sqrt`.
>
> I see.
>
> I have no other comments on the code. I look forward for the tests.
Not sure if you are planning to make other code changes before adding the tests?
>From my perspective, the current status of the code looks good.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21301#discussion_r1853990118
More information about the core-libs-dev
mailing list