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

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: 21
    • Component/s: 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.

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

              Created:
              Updated: