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

micro-optimize Instant.plusSeconds

    XMLWordPrintable

Details

    • b22
    • generic
    • generic

    Description

      ADDITIONAL SYSTEM INFORMATION :
      OS: Ubuntu Focal
      Arch x86_64
      Tested againt main branch and 17.0.3 (openjdk builds from ubuntu)

      A DESCRIPTION OF THE PROBLEM :
      During transitioning from longs to Instant I realized that tight loops over Instants take a lot of time adding seconds to some start Instant.

      The method Instant.plusSeconds delegates to a generic Instant.plus, that has to deal with the nanosecond adjustments. Specializing Instant.plusSeconds can give a significant speedup.


      Attachments

        Issue Links

          Activity

            People

              naoto Naoto Sato
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: