On Tue, 18 Apr 2023 18:49:54 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 incrementally with one
> additional commit since the last revision:
>
> 8300818: special cases
test/micro/org/openjdk/bench/java/time/format/DateTimeFormatterBench.java line
122:
> 120: }
> 121:
> 122: }
Drop this blank line and there will be no changes.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/12131#discussion_r1171524385