On Tue, 27 Aug 2024 11:52:38 GMT, Shaojin Wen wrote:
>> The string concatenation of java.base module is implemented based on
>> StringBuilder, which will result in extra object allocation and slow
>> performance. We can solve this problem by using String.concat method and
>> StringConcatHelper
On Sun, 25 Aug 2024 21:41:11 GMT, Shaojin Wen wrote:
>> Well, `Class::descriptorString()` is referenced from the
>> `ReferenceClassDescImpl` creation code in `ConstantUtils`:
>> https://github.com/openjdk/jdk/blob/5671f836039ef1683e3e9ce5b7cf0fa2f1860e2d/src/java.base/share/classes/jdk/internal
> The string concatenation of java.base module is implemented based on
> StringBuilder, which will result in extra object allocation and slow
> performance. We can solve this problem by using String.concat method and
> StringConcatHelper to provide concat method.
>
> for example,
>
> * use "+
On Sun, 25 Aug 2024 21:29:17 GMT, ExE Boss wrote:
>> In this case, there are too many locations under the java.lang package to
>> change, and a new PR may be more appropriate.
>
> Well, `Class::descriptorString()` is referenced from the
> `ReferenceClassDescImpl` creation code in `ConstantUtil
On Sun, 25 Aug 2024 21:07:16 GMT, Shaojin Wen wrote:
>> 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 u
On Sun, 25 Aug 2024 16:55:23 GMT, ExE Boss 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(Stri
On Sun, 25 Aug 2024 13:36:34 GMT, Shaojin Wen 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 pref