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

    • Enhancement
    • Resolution: Fixed
    • P4
    • 16
    • None
    • core-libs
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: