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

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • core-libs
    • b110

      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.

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

              Created:
              Updated:
              Resolved: