Use String.newStringWithLatin1Bytes to simplify Integer/Long toString method

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 26
    • Affects Version/s: None
    • Component/s: core-libs
    • b22


      With the introduction of String.newStringWithLatin1Bytes, we can use it to simplify the toString methods of Integer and Long. By replacing the implementation that supports COMPACT_STRING = false with newStringWithLatin1Bytes, we gain the following benefits:
      1. Simplified implementation
      2. Strings with codeSize < 35 in Integer.toString(int) and Long.toString(long) can be inlined in C1, improving performance in early calls.

            Assignee:
            Shaojin Wen
            Reporter:
            Shaojin Wen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: