On Mon, 17 Apr 2023 15:21:34 GMT, Roger Riggs wrote:
>> @RogerRiggs sorry I don't get it. Maybe you mean speacial casing for
>> `padWidth - len`?
>
> Yes, I meant on the length of the inserted padding.
Done
-
PR Review Comment:
On Sun, 16 Apr 2023 11:44:52 GMT, Sergey Tsypanov wrote:
>> Special casing for len == 0 and keeping the existing buf.insert for len == 1
>> would avoid object creation except when it would improve performance.
>
> @RogerRiggs sorry I don't get it. Maybe you mean speacial casing for
> `padWidth
On Wed, 12 Apr 2023 17:41:58 GMT, Roger Riggs wrote:
>> Added benchmark for this
>
> Special casing for len == 0 and keeping the existing buf.insert for len == 1
> would avoid object creation except when it would improve performance.
@RogerRiggs sorry I don't get it. Maybe you mean speacial
On Fri, 24 Mar 2023 19:28:57 GMT, Sergey Tsypanov wrote:
>> Meant that you should verify that something like this, which just add a
>> little padding, doesn't regress with your changes:
>>
>> DateTimeFormatter dtf = new DateTimeFormatterBuilder()
>> .appendLiteral("Year:")
>>
On Mon, 13 Mar 2023 19:24:38 GMT, Roger Riggs wrote:
>> Sergey Tsypanov 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 two additional
>>
On Sun, 22 Jan 2023 09:50:21 GMT, Sergey Tsypanov wrote:
>> Currently it's O(n) - we do `n` shifts of bytes within `StringBuilder`. This
>> can be reduced to O(1) improving the code like:
>>
>> DateTimeFormatter dtf = new DateTimeFormatterBuilder()
>> .appendLiteral("Date:")
>>
On Sun, 22 Jan 2023 09:50:21 GMT, Sergey Tsypanov wrote:
>> Currently it's O(n) - we do `n` shifts of bytes within `StringBuilder`. This
>> can be reduced to O(1) improving the code like:
>>
>> DateTimeFormatter dtf = new DateTimeFormatterBuilder()
>> .appendLiteral("Date:")
>>
On Mon, 23 Jan 2023 11:34:27 GMT, Claes Redestad wrote:
>> The modified code is called only when a user explicitly calls `padNext(int,
>> char)`, i.e. if I modified the example snippet as
>>
>> DateTimeFormatter dtf = new DateTimeFormatterBuilder()
>> .appendLiteral("Date:")
>>
On Mon, 13 Mar 2023 19:24:38 GMT, Roger Riggs wrote:
>> Sergey Tsypanov 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 two additional
>>
On Sun, 22 Jan 2023 13:28:06 GMT, Sergey Tsypanov wrote:
>> src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java
>> line 2611:
>>
>>> 2609: "Cannot print as output of " + len + " characters
>>> exceeds pad width of " + padWidth);
>>> 2610:
On Sun, 22 Jan 2023 11:36:34 GMT, Claes Redestad wrote:
>> Sergey Tsypanov 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 two additional
>>
On Sun, 22 Jan 2023 10:56:11 GMT, Claes Redestad wrote:
>> Sergey Tsypanov 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 two additional
>>
On Sun, 22 Jan 2023 09:50:21 GMT, Sergey Tsypanov wrote:
>> Currently it's O(n) - we do `n` shifts of bytes within `StringBuilder`. This
>> can be reduced to O(1) improving the code like:
>>
>> DateTimeFormatter dtf = new DateTimeFormatterBuilder()
>> .appendLiteral("Date:")
>>
> Currently it's O(n) - we do `n` shifts of bytes within `StringBuilder`. This
> can be reduced to O(1) improving the code like:
>
> DateTimeFormatter dtf = new DateTimeFormatterBuilder()
> .appendLiteral("Date:")
> .padNext(20, ' ')
> .append(DateTimeFormatter.ISO_DATE)
>
14 matches
Mail list logo