Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8137055 Prepare for JEP 260
  3. JDK-8151384

Improve String.CASE_INSENSITIVE_ORDER and remove sun.misc.ASCIICaseInsensitiveComparator

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Resolved In Build:
      b110

      Description

      sun.misc.ASCIICaseInsensitiveComparator appears to be a specialized comparator for comparing
      strings that contain only ASCII characters. Its main usage seems to be in sorted maps that support the
      character set implementation. It looks like an optimized version of Strings public case sensitive
      comparator, when the strings are known to contain only ASCII characters. The public string case
      insensitive comparator, in some cases, does a toUpperCase and a toLowerCase.
      ASCIICaseInsensitiveComparator is trying to avoid this.

      Looking at String.CASE_INSENSITIVE_ORDER it looks like it can be, somewhat easily, optimized to give
      similar performance to that of ASCIICaseInsensitiveComparator without much risk. This will allow
      usages of ASCIICaseInsensitiveComparator to be replaced with String.CASE_INSENSITIVE_ORDER.

      Note: this issue is not intending to optimize String.CASE_INSENSITIVE_ORDER as much as possible,
      just to make reasonable changes that improve performance to a point where it is a reasonable
      replacement for ASCIICaseInsensitiveComparator. Further optimization should not be prevented,
      or twarted, by this work.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                chegar Chris Hegarty
                Reporter:
                chegar Chris Hegarty
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: