Re: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v3]

2023-04-16 Thread Sergey Tsypanov
On Wed, 12 Apr 2023 17:39:16 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 six additional >> commit

Re: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v3]

2023-04-12 Thread Roger Riggs
On Mon, 10 Apr 2023 14:01:53 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:") >> .padNext(20,

Re: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v3]

2023-04-10 Thread Sergey Tsypanov
> 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();