On Mon, 11 Sep 2023 14:59:25 GMT, 温绍锦 <d...@openjdk.org> wrote:

>> The performance of optimizing DateTimeFormatter cannot be as fast as using 
>> ixed-length buffer directly.
>
> Of course, the optimization of DateTimeFormatter is more general, and we can 
> spend time doing it later. The format of toString is fixed, we can not use 
> DateTimeFormatter.

> Have you considered potentially more generalizable optimizations to 
> `DateTimeFormatter.ISO_INSTANT.format(this)` here?
> 
> Hand-rolling a fixed-length buffer, skipping the `StringBuilder` .. 
> understandably this can have a performance edge, but perhaps a 
> `DateTimeFormatter` like `ISO_INSTANT` can be optimized to get closer to 
> whatever speed-up this gets you - with broader implications.

I submitted an optimization for the commonly used format of 
DateTimeFormatter::format

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/15658#discussion_r1323021409

Reply via email to