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

Re-examine DigitList digits resizing during parsing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 26
    • core-libs

      DecimalFormat while parsing utilizes DigitList which stores discovered digits into the `digits` array. Currently the resizing approach is to add a constant 100. This approach seems odd and not tied to any particular reasoning, especially considering that the input can be up to the max length of a String for a parse. Thus, we should switch to a resizing approach of multiplying by a constant rather than linear adding. This will help with performance, especially with large inputs since much less time is spent constantly allocating a larger array and copying over elements.

            jlu Justin Lu
            jlu Justin Lu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: