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

AbstractStringBuilder.insert(int dstOffset, CharSequence s, int start, int end) is missing fast-path for String

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 16
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b27

      Description

      StringBuilder.insert is missing a fast-path for the most frequent case when its argument is String.

      Previously they did similar optimization for StringBuilder.append(CharSequence, int, int),
      see https://bugs.openjdk.java.net/browse/JDK-8224986

      The proponent would like to contribute a trivial patch that brings improvement for the case when SB's content is Latin1 and inserted String is Latin1 as well.

      From core-libs-dev:
         https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-September/069197.html

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              redestad Claes Redestad
              Reporter:
              rriggs Roger Riggs
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: