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.
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.
- relates to
-
JDK-7050528 Improve performance of java.text.DecimalFormat.format() call stack
- Resolved