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

Remove CharacterData.isOtherUppercase/-Lowercase

XMLWordPrintable

    • b13

      Folding the isOtherUppercase/-Lowercase methods into isUpperCase and isLowerCase respectively would simplify code structure and allow for a small startup improvement in some apps.

      Additionally CharacterDataLatin1.isOtherUppercase always returns false, so the lookup in getPropertiesEx can be removed altogether for this case, which gives a small speed-up in microbenchmarks.

      This opens some questions regarding semantics of such a change in presence of an intrinsic, especially CharacterDataLatin1.isLowerCase which will change semantics subtly. Currently only PPC implements these intrinsics, see JDK-8213754

      My reading of the POWER9 assembly might be off, but the lowercase intrinsic appears to handle the two codepoint (0xaa, 0xba) that return true for CharacterDataLatin1.isOtherLowercase(codepoint) in the 0-255 range: https://github.com/openjdk/jdk/commit/31fbc28af5d8933f7b8d6b25249fccb1a738ffb6#diff-d21a64a4949f298476bf91083d3b956face9a6393a08a706b071068898533082R12463

      It thus appears this refactoring would bring the java code for CharacterDataLatin1.isLowerCase more in line with the semantics expressed by the PPC intrinsic.

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

              Created:
              Updated:
              Resolved: