-
Type:
Enhancement
-
Resolution: Unresolved
-
Priority:
P4
-
Affects Version/s: None
-
Component/s: core-libs
By using the Class File API to dynamically generate a CompositePrinterParser.
Since the CompositePrinterParser is generated based on the pattern, we can make the following optimizations:
For example, for the parse and print of Month/DayOfMonth/Hour/Minute/Second with a fixed length of 2, do targeted parse and print optimization.
Parse uses LocalDate/LocalTime/LocalDateTime/OffsetDateTime for TemporalQuery to avoid the overhead of constructing DateTimeParseContext.
These optimizations can significantly improve performance, with more than 100% performance improvement in many scenarios.
Since the CompositePrinterParser is generated based on the pattern, we can make the following optimizations:
For example, for the parse and print of Month/DayOfMonth/Hour/Minute/Second with a fixed length of 2, do targeted parse and print optimization.
Parse uses LocalDate/LocalTime/LocalDateTime/OffsetDateTime for TemporalQuery to avoid the overhead of constructing DateTimeParseContext.
These optimizations can significantly improve performance, with more than 100% performance improvement in many scenarios.
- links to
-
Review(master)
openjdk/jdk/23384