RFR: 8365832: Optimize FloatingDecimal and DigitList with byte[] and cleanup [v5]

Shaojin Wen swen at openjdk.org
Wed Aug 20 15:15:01 UTC 2025


> Since FloatToDecimal and DoubleToDecimal are used in Float.toString and Double.toString, some code in FloatingDecimal is not used. 
> 
> This PR refactors `FloatingDecimal` and `DigitList` to improve efficiency and reduce code duplication.
> 
> Key changes:
> * Convert internal digit storage from `char[]` to `byte[]` for reduced memory footprint.
> *   Remove unused code and methods that are no longer needed.

Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:

  remove unused buffer, from @j3graham

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/23311/files
  - new: https://git.openjdk.org/jdk/pull/23311/files/7664a3f9..2b0f0656

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=23311&range=04
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23311&range=03-04

  Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/23311.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23311/head:pull/23311

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


More information about the core-libs-dev mailing list