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

fabioromano1 duke at openjdk.org
Thu Sep 25 17:40:33 UTC 2025


On Thu, 25 Sep 2025 12:26:27 GMT, fabioromano1 <duke at openjdk.org> wrote:

>> A formula to lower the overestimate for the precision of an exact quotient, without introducing too expensive operations of division on numerator and denominator.
>
> fabioromano1 has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Comments

Master branch results:

Benchmark                           Mode  Cnt       Score        Error  Units
BigDecimalDivide.testExactDivideL   avgt   15  109800.570 ±   4612.510  ns/op
BigDecimalDivide.testExactDivideM   avgt   15   18786.818 ±    725.330  ns/op
BigDecimalDivide.testExactDivideS   avgt   15    9764.192 ±     98.841  ns/op
BigDecimalDivide.testExactDivideXL  avgt   15  976249.610 ± 194313.150  ns/op
BigDecimalDivide.testExactDivideXS  avgt   15    7782.170 ±    209.999  ns/op
``` 

PR branch results:

Benchmark                           Mode  Cnt      Score     Error  Units
BigDecimalDivide.testExactDivideL   avgt   15   9323.939 ± 302.617  ns/op
BigDecimalDivide.testExactDivideM   avgt   15   5367.752 ±  87.323  ns/op
BigDecimalDivide.testExactDivideS   avgt   15   4514.351 ±  79.579  ns/op
BigDecimalDivide.testExactDivideXL  avgt   15  37474.101 ± 601.947  ns/op
BigDecimalDivide.testExactDivideXS  avgt   15   3983.560 ±  60.067  ns/op

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

PR Comment: https://git.openjdk.org/jdk/pull/27271#issuecomment-3335209854


More information about the core-libs-dev mailing list