Array-like access to characters of a string is slow

XMLWordPrintable

    • Type: Task
    • Resolution: Fixed
    • Priority: P4
    • 8
    • Affects Version/s: None
    • Component/s: core-libs
    • None

      Array-like access of characters in a string is currently very slow in Nashorn because it is done by the generic ScriptObject accessors and involves creation of a temporary NativeString wrapper.

      It would be better to check whether a key is a valid index for the given string and only fall back to NativeString if it is not.

            Assignee:
            Hannes Wallnoefer
            Reporter:
            Hannes Wallnoefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: