On Sun, 22 Jan 2023 09:50:21 GMT, Sergey Tsypanov <[email protected]> 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:")
>> .padNext(20, ' ')
>> .append(DateTimeFormatter.ISO_DATE)
>> .toFormatter();
>> String text = dtf.format(LocalDateTime.now());
>
> 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
> commits since the last revision:
>
> - Merge branch 'master' into dtfb
> - Improve padding of DateTimeFormatter
fyi, you might want to wait for https://github.com/openjdk/jdk/pull/12728
-------------
PR Comment: https://git.openjdk.org/jdk/pull/12131#issuecomment-1466817993