-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
b28
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8056459 | emb-9 | Xueming Shen | P4 | Resolved | Fixed | master |
java.time.Duration#parse uses a regex to parse a Strings like PT3M23.232S. Current method to parse this generates a number of String objects which are then parsed. By using offset based parse methods (8041972) we can avoid most String creation.
Same thing applies to java.time.Period
Other possible improvements:
- not doing string concatenation to pad nanos fraction (parsing first then multiplying is up to 6x faster and allocation free)
- not manifesting String objects (matcher.group(x)) for single char matches
Same thing applies to java.time.Period
Other possible improvements:
- not doing string concatenation to pad nanos fraction (parsing first then multiplying is up to 6x faster and allocation free)
- not manifesting String objects (matcher.group(x)) for single char matches
- backported by
-
JDK-8056459 Reduce allocation overhead in java.time.Period/Duration parse methods
-
- Resolved
-
- relates to
-
JDK-8041972 Add improved parse methods for Long/Integer
-
- Closed
-