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.
- relates to
-
JDK-8371746 Some imports in Integer.java and Long.java became unused after JDK-8370503
-
- Resolved
-
- links to
-
Commit(master)
openjdk/jdk/fd23a61c
-
Review(master)
openjdk/jdk/27929