On Tue, 22 Mar 2022 06:54:35 GMT, Xin Liu wrote:
>> src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1008:
>>
>>> 1006: this.count = newCount;
>>> 1007: putStringAt(start, str);
>>> 1008: if (end - start > 0) {
>>
>> regardless of value of `end -
On Tue, 15 Mar 2022 23:25:17 GMT, Claes Redestad wrote:
>> Xin Liu has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Change growOnly to maybeLatin.
>>
>> This patch also copys over the attribute from the other
>>
On Wed, 9 Mar 2022 08:33:36 GMT, Xin Liu wrote:
>> If AbstractStringBuilder only grow, the inflated value which has been
>> encoded in UTF16 can't be compressed.
>> toString() can skip compression in this case. This can save an
>> ArrayAllocation in StringUTF16::compress().
>>
>>
On Wed, 9 Mar 2022 08:33:36 GMT, Xin Liu wrote:
>> If AbstractStringBuilder only grow, the inflated value which has been
>> encoded in UTF16 can't be compressed.
>> toString() can skip compression in this case. This can save an
>> ArrayAllocation in StringUTF16::compress().
>>
>>
On Wed, 9 Mar 2022 08:33:36 GMT, Xin Liu wrote:
>> If AbstractStringBuilder only grow, the inflated value which has been
>> encoded in UTF16 can't be compressed.
>> toString() can skip compression in this case. This can save an
>> ArrayAllocation in StringUTF16::compress().
>>
>>
On Wed, 9 Mar 2022 08:33:36 GMT, Xin Liu wrote:
>> If AbstractStringBuilder only grow, the inflated value which has been
>> encoded in UTF16 can't be compressed.
>> toString() can skip compression in this case. This can save an
>> ArrayAllocation in StringUTF16::compress().
>>
>>
> If AbstractStringBuilder only grow, the inflated value which has been encoded
> in UTF16 can't be compressed.
> toString() can skip compression in this case. This can save an
> ArrayAllocation in StringUTF16::compress().
>
> java.io.BufferedRead::readLine() is a case that StringBuilder grows