On Wed, 23 Mar 2022 00:35:14 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 Tue, 22 Mar 2022 10:09:40 GMT, Claes Redestad wrote:
>> Xin Liu has updated the pull request with a new target base due to a merge
>> or a rebase. The incremental webrev excludes the unrelated changes brought
>> in by the merge/rebase. The pull request contains six additional commits
>>
> 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
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, 22 Mar 2022 08:05:35 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
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
On Tue, 8 Mar 2022 17:33:58 GMT, Daniel Jeliński wrote:
> As for a better name for `growOnly`, something like `mayBeLatin` would better
> convey the variable's purpose. What do you think?
There are tricky. I need to add test to cover them.
The problem comes from that this patch fails to
On Mon, 7 Mar 2022 23:36:41 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 Mon, 7 Mar 2022 12:10:51 GMT, Daniel Jeliński wrote:
>> Xin Liu has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> make sure String(StringBuffer) is still synchronized.
>
> src/java.base/share/classes/java/lang/String.java line 1446:
>
> 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
On Thu, 3 Mar 2022 02:36:58 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 Thu, 3 Mar 2022 08:11:19 GMT, Daniel Jeliński 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 Thu, 3 Mar 2022 08:07:53 GMT, Daniel Jeliński 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 Thu, 3 Mar 2022 02:36:58 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 Thu, 3 Mar 2022 02:36:58 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 is 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 only.
22 matches
Mail list logo