On Wed, 13 Jan 2021 13:48:40 GMT, Claes Redestad wrote:
>> Сергей Цыпанов 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 five additional
>> com
On Thu, 14 Jan 2021 12:48:18 GMT, Сергей Цыпанов
wrote:
>> Instead of allocating a copy of underlying array via
>> `CharArrayWriter.toCharArray()` and passing it to constructor of String
>> String str = new String(charArrayWriter.toCharArray());
>> we could call `toString()` method
>> String st
On Thu, 14 Jan 2021 11:48:16 GMT, Claes Redestad wrote:
>> @cl4es SB brings pessimization both for time and memory, try
>> `org.openjdk.bench.java.net.URLEncodeDecode`:
>> master
>> (count) (maxLength)
>> (mySeed) Mode Cnt Score
> Instead of allocating a copy of underlying array via
> `CharArrayWriter.toCharArray()` and passing it to constructor of String
> String str = new String(charArrayWriter.toCharArray());
> we could call `toString()` method
> String str = charArrayWriter.toString();
> decoding existing char[] witho
On Thu, 14 Jan 2021 09:31:19 GMT, Сергей Цыпанов
wrote:
>> Looks good.
>>
>> I wonder... `CharArrayWriter` is an old and synchronized data structure, and
>> since the instance used here isn't shared that synchronization seem useless.
>> And since you're now bypassing the `char[]` and going st
> Instead of allocating a copy of underlying array via
> `CharArrayWriter.toCharArray()` and passing it to constructor of String
> String str = new String(charArrayWriter.toCharArray());
> we could call `toString()` method
> String str = charArrayWriter.toString();
> decoding existing char[] witho
On Wed, 13 Jan 2021 13:48:40 GMT, Claes Redestad wrote:
>> Instead of allocating a copy of underlying array via
>> `CharArrayWriter.toCharArray()` and passing it to constructor of String
>> String str = new String(charArrayWriter.toCharArray());
>> we could call `toString()` method
>> String str
On Wed, 13 Jan 2021 13:48:40 GMT, Claes Redestad wrote:
>> Instead of allocating a copy of underlying array via
>> `CharArrayWriter.toCharArray()` and passing it to constructor of String
>> String str = new String(charArrayWriter.toCharArray());
>> we could call `toString()` method
>> String str
On Thu, 3 Dec 2020 14:29:58 GMT, Сергей Цыпанов
wrote:
> Instead of allocating a copy of underlying array via
> `CharArrayWriter.toCharArray()` and passing it to constructor of String
> String str = new String(charArrayWriter.toCharArray());
> we could call `toString()` method
> String str = ch
On Thu, 3 Dec 2020 14:29:58 GMT, Сергей Цыпанов
wrote:
> Instead of allocating a copy of underlying array via
> `CharArrayWriter.toCharArray()` and passing it to constructor of String
> String str = new String(charArrayWriter.toCharArray());
> we could call `toString()` method
> String str = ch
On Mon, 11 Jan 2021 09:28:46 GMT, Сергей Цыпанов
wrote:
>> Looks good!
>
> @szegedi could you please create a ticket for this change? Otherwise I cannot
> merge it
Filed a ticket, you should rename this PR to "8259699: Reduce char[] copying in
URLEncoder.encode(String, Charset)"
On Sun, 10 Jan 2021 20:13:51 GMT, Attila Szegedi wrote:
>> Instead of allocating a copy of underlying array via
>> `CharArrayWriter.toCharArray()` and passing it to constructor of String
>> String str = new String(charArrayWriter.toCharArray());
>> we could call `toString()` method
>> String str
Instead of allocating a copy of underlying array via
`CharArrayWriter.toCharArray()` and passing it to constructor of String
String str = new String(charArrayWriter.toCharArray());
we could call `toString()` method
String str = charArrayWriter.toString();
decoding existing char[] without making a
13 matches
Mail list logo