On Sun, 11 May 2025 16:32:02 GMT, Johannes Graham <d...@openjdk.org> wrote:

>> Optimize `BigDecimal.valueOf(double)` by using `FormattedFPDecimal` instead 
>> of converting to decimal string and then parsing it. This results in an 
>> approximate 6x improvement for me.
>
> On Aarch64 M4:
> 
> Benchmark                                Mode  Cnt   Score   Error  Units
> + BigDecimals.testValueOfWithDouble        avgt   15   9.913 ± 0.080  ns/op
> - BigDecimals.testValueOfWithDoubleString  avgt   15  65.846 ± 0.801  ns/op

Thanks @j3graham for this nice enhancement!

Before approval, let's give another 24 hours for people around the globe to 
have a chance for further comments.

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

PR Comment: https://git.openjdk.org/jdk/pull/25173#issuecomment-2880505868

Reply via email to