Improve Character.isLowerCase/isUpperCase lookups

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 17
    • Affects Version/s: None
    • Component/s: core-libs
    • None
    • b14

      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.

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

              Created:
              Updated:
              Resolved: