RFR: 8341470: BigDecimal.stripTrailingZeros() optimization

fabioromano1 duke at openjdk.org
Thu Oct 3 12:48:45 UTC 2024


An optimized algorithm for `BigDecimal.stripTrailingZeros()` that uses repeated squares trick.

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

Commit messages:
 - Removed trailing whitespaces
 - Changed stripTrailingZeros() implementation

Changes: https://git.openjdk.org/jdk/pull/21323/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21323&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8341470
  Stats: 64 lines in 2 files changed: 41 ins; 4 del; 19 mod
  Patch: https://git.openjdk.org/jdk/pull/21323.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/21323/head:pull/21323

PR: https://git.openjdk.org/jdk/pull/21323


More information about the core-libs-dev mailing list