Re: FixedDateFormat performance

2021-10-26 Thread Volkan Yazıcı
Indeed confining the maximum time span to one day fixed the issue. Thanks so much for the prompt response Carter! On Tue, Oct 26, 2021 at 10:15 PM Carter Kozak wrote: > It looks like we're spending a great deal of time calculating midnight, > and the delta to midnight. I don't think this is a re

Re: FixedDateFormat performance

2021-10-26 Thread Carter Kozak
It looks like we're spending a great deal of time calculating midnight, and the delta to midnight. I don't think this is a representative benchmark because the time intervals are not ordered, nor are they close together. This means the entire cache is invalidated each iteration (date, time, etc

FixedDateFormat performance

2021-10-26 Thread Volkan Yazıcı
I always had the impression that Log4j `FixedDateFormat` is faster than Commons `FastDateFormat` which is faster than Java `DateTimeFormatter`, yet, unless I am doing something stupid, the picture is totally different in Java 17: *Benchmark (pattern) Mode Cnt Score Er