-
Enhancement
-
Resolution: Fixed
-
P4
-
17, 20, 21
-
b16
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8309905 | 17.0.9 | Oli Gillespie | P4 | Resolved | Fixed | b01 |
1) When DateTimeFormatter is reused we don't need to copy availableZoneIds and allocate nonRegionIds as PrefixTree can be taken from cache. In the related benchmark allocation of HashSet takes ~93% of all time, so avoiding it should bring some improvement for cases when we reuse DateTimeFormatter to parse a string into ZoneDateTime.
2) DateTimeFormatter is mostly used with one locale, so cachedTree and cachedTreeCI can have predefined size.
2) DateTimeFormatter is mostly used with one locale, so cachedTree and cachedTreeCI can have predefined size.