Two interesting string-related features, Compact Strings and Indify String Concatenation will be part of JDK 9. JEP 254
, the compact strings optimization for OpenJDK 9 will improve the footprint of Java String and related classes while preserving full compatibility for all related Java and native interfaces. JEP 280
, Indify String Concatenation will enable invokedynamic to concatenate strings, to free runtime implementors for optimizing string concatenation without pushing users to recompile their programs.
In this talk, Oracle Engineer Aleksey Shipilev discusses the rationale, pitfalls and caveats of implementing those features.
In this interview, Oracle Engineer Aleksey Shipilev shows a String Concat Benchmark running in different JDK 9 builds. To download and test the latest Java 9 build, visit jdk9.java.net/download/