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

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

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P5
    • Resolution: Unresolved
    • Affects Version/s: 9
    • Fix Version/s: tbd_minor
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Understanding:
      Fix Understood
    • CPU:
      generic
    • OS:
      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

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

                Dates

                Created:
                Updated: