Character.isLowerCase/isUpperCase returns true for some non-letter characters, which means the logic currently checks the type generic type. If it matches (Character.UPPERCASE_LETTER/LOWERCASE_LETTER) we return true, otherwise we check the "Other_Uppercase"/"Other_Lowercase" Unicode property that is currently encoded into the B[] table. This means more code and an extra branch.
By recording the combined uppercase / lowercase properties into a single bit each, we could optimize the logic to a single table lookup.
By recording the combined uppercase / lowercase properties into a single bit each, we could optimize the logic to a single table lookup.
- relates to
-
JDK-8264678 Incomplete comment in build.tools.generatecharacter.GenerateCharacter
-
- Resolved
-