Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8283681

Improve ZonedDateTime offset handling

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 19
    • None
    • core-libs
    • None
    • b16

    Description

      ZoneOffset::getRules isn't cached, so use heavily relies on escape analysis to elide the allocation. This is fragile optimization-wise, and even when it works we do extra computation that slows things down.

      Adding an abstract ZoneId::getOffset(epochSecond) means that we can avoid querying ZoneOffset::getRules altogether, eliminating the risk we miss escape analysis. Such specialization also helps the ZoneRegion case.

      Attachments

        Issue Links

          Activity

            People

              redestad Claes Redestad
              redestad Claes Redestad
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: