<i18n dev> RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point

Alan Bateman alanb at openjdk.org
Wed Jan 11 11:57:14 UTC 2023


On Wed, 11 Jan 2023 10:47:03 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

> This change transforms a O(n^2) path to O(n) when prepending zero padding to decimal outputs, where n is the length of the padding.

I assume this issue has been there for a long time, just not noticed because it would be unusual to specify a width of this magnitude. The switch to using repeat + one insert looks good. Are you okay for tests in this area?

-------------

PR: https://git.openjdk.org/jdk/pull/11939


More information about the i18n-dev mailing list