On Wed, 13 Sep 2023 14:22:35 GMT, 温绍锦 <d...@openjdk.org> wrote:

>> improve date toString performance, includes:
>> 
>> java.util.Date.toString
>> java.util.Date.toGMTString
>> java.time.Instant.toString
>> java.time.LocalDate.toString
>> java.time.LocalDateTime.toString
>> java.time.LocalTime.toString
>
> 温绍锦 has updated the pull request incrementally with one additional commit 
> since the last revision:
> 
>   simplify LocalDate::getChars

For DateTimeFormatter, it first isn't effectively constant since its composite 
printerparser isn't immutable/stable. Also we can probably try if we can 
pre-allocate like for string concat to see if eliminated allocations help. For 
StringBuilder allocation, if JIT cannot eliminate it, we can probably switch to 
writing byte array + index since the interface in Formatter seems to be 
internal.

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

PR Comment: https://git.openjdk.org/jdk/pull/15658#issuecomment-1732565954

Reply via email to