RFR: 8367603: Optimize exact division in BigDecimal [v24]

Raffaello Giulietti rgiulietti at openjdk.org
Wed Oct 29 15:29:00 UTC 2025


On Wed, 29 Oct 2025 11:48:04 GMT, fabioromano1 <duke at openjdk.org> wrote:

>> src/java.base/share/classes/java/math/BigDecimal.java line 1794:
>> 
>>> 1792:         if (this.signum() == 0) // 0/y
>>> 1793:             return zeroValueOf(preferredScale);
>>> 1794:         else {
>> 
>> The old algorithm has relatively few paths through it for different arguments.
>> 
>> Do the existing test cases provide adequate coverage of the new set of code paths?
>
> I think they do, @rgiulietti do you think the test coverage is adequate?

I'll have a look tomorrow.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27271#discussion_r2473799850


More information about the core-libs-dev mailing list