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

Array-like access to characters of a string is slow

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • P4
    • 8
    • None
    • core-libs
    • None

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: