On Wed, 18 Mar 2026 18:57:15 GMT, Daisuke Yamazaki <[email protected]> wrote:

> Replace loop-based normalisation with `Long.numberOfTrailingZeros` in 
> `BigDecimal(double, MathContext)` constructor.
> 
> Compute the number of trailing(rightmost) zero bits  in the significand and 
> perform a single shift,
> instead of repeated shifting in a loop.
> This preserves behaviour and improves performance.

This has been proposed almost verbatim here:
https://mail.openjdk.org/pipermail/core-libs-dev/2025-December/156816.html
but unfortunately didn't go anywhere.

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

PR Comment: https://git.openjdk.org/jdk/pull/30303#issuecomment-4088818833

Reply via email to