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

Extends DecimalFormat.format optimization to the HALF_UP/HALF_DOWN rounding cases

    XMLWordPrintable

Details

    • Enhancement
    • Status: Closed
    • P5
    • Resolution: Won't Fix
    • 9
    • tbd_minor
    • core-libs
    • None
    • generic
    • generic

    Description

      The DecimalFormat.format(double, ...) optimization that has been provided in JDK (see JDK-7050528) is available only for the HALF_EVEN rounding. HALF_UP and HALF_DOWN rounding still use the slow path.

      While HALF_EVEN rounding mode is the rounding case that is mainly and mostly used, this means that there are throughput inconsistencies for floating-point values that are in the integer range depending on the rounding case used.

      Recent customer feedback has shown that HALF_UP and HALF_DOWN rounding cases are also used in business applications.

      Extending this optimization to the HALF_UP and HALF_DOWN rounding does not need a lot of work.

      To avoid any usability issue between these rounding modes due to this throughput difference (x10 factor) it would be good to extend the optimization to HALF_UP/_DOWN rounding cases.

      Attachments

        Issue Links

          Activity

            People

              darcy Joe Darcy
              olagneau Olivier Lagneau (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: