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

micro-optimize Instant.plusSeconds

XMLWordPrintable

    • b22
    • generic
    • generic

      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.


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

              Created:
              Updated:
              Resolved: