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

Applying String::align and String::indent at Compile Time

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Future Project
    • Icon: P3 P3
    • None
    • None
    • tools
    • None
    • generic
    • generic

      Raw String Literals introduce a performance penalty for those developers indenting string bodies to align with surrounding code. This incidental indentation increases the space needed for the string in the class file and incurs a cost to remove the indentation at runtime, usually via String::align. To compensate, this feature reflectively applies select String methods at compile time, so that 1) minimum space is used to represent the string in the class file and 2) zero runtime cost occurs.

            jlaskey Jim Laskey
            jlaskey Jim Laskey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: