On Sun, 11 May 2025 16:22:11 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.

src/java.base/share/classes/jdk/internal/math/FormattedFPDecimal.java line 141:

> 139:     /**
> 140:      * Value <code>scale</code>, such that
> 141:      * <code> value = (f &times; 10<sup>-scale</sup>)</code>

Raw javadoc nit: wherever possible, please use `{@code foo}` rather than 
`<code>foo</code>`. I find the former much easier to read and it is fewer 
characters too.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25173#discussion_r2085880551

Reply via email to