On Sun, 25 Aug 2024 16:55:23 GMT, ExE Boss <d...@openjdk.org> wrote: >> Optimize ClassDesc related string concatenation, which will reduce object >> allocation during startup. > > src/java.base/share/classes/java/lang/StringConcatHelper.java line 787: > >> 785: } >> 786: >> 787: static String concat(String prefix, String value, String suffix) { > > `Class::descriptorString()` can probably also make use of this method and > `String::concat(String)`: > > if (isArray()) { > return "[".concat(componentType.descriptorString()); > } else if (isHidden()) { > // unchanged > } else { > String name = getName().replace('.', '/'); > return StringConcatHelper.concat("L", name, ";"); > }
In this case, there are too many locations under the java.lang package to change, and a new PR may be more appropriate. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20705#discussion_r1730430947