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

Speed up CharacterData.of by avoiding bit shifting in the latin1 fast-path test

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 21
    • core-libs
    • None

      CharacterData.of has a fast-path returning CharacterDataLatin1 for code points in the latin1 range.

      The test for this fast-path is currently expressed as 'ch >>> 8 == 0', this can be replaced with just 'ch < 0xFF' which seems faster.

            eirbjo Eirik Bjørsnøs
            eirbjo Eirik Bjørsnøs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: