RFR: 8370503: Use String.newStringWithLatin1Bytes to simplify Integer/Long toString method [v2]
Shaojin Wen
swen at openjdk.org
Thu Oct 23 15:34:23 UTC 2025
> With the introduction of String.newStringWithLatin1Bytes, we can use it to simplify the toString methods of Integer and Long. By replacing the implementation that supports COMPACT_STRING = false with newStringWithLatin1Bytes, we gain the following benefits:
> 1. Simplified implementation
> 2. Strings with codeSize < 35 in Integer.toString(int) and Long.toString(long) can be inlined in C1, improving performance in early calls.
Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:
clean up, from @rgiulietti
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/27929/files
- new: https://git.openjdk.org/jdk/pull/27929/files/cf7b33a8..9818de0b
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=27929&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=27929&range=00-01
Stats: 41 lines in 2 files changed: 0 ins; 41 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/27929.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27929/head:pull/27929
PR: https://git.openjdk.org/jdk/pull/27929
More information about the core-libs-dev
mailing list