What is current status of Oracle Java HotSpot VM performance options (+UseStringCache, +UseCompressedStrings, +OptimizeStringConcat)
To check defaults use
java -XX:+PrintFlagsFinal
To find exactly what you want you can
java -XX:+PrintFlagsFinal | grep UseCompressedStrings
I know that -XX:+UseCompressedStrings
was dropped in Java 7 on the basis it was too hard to support.
For Java 7 update 40
$ java -XX:+PrintFlagsFinal 2>&1 | grep UseStringCache
bool UseStringCache = false {product}
$ java -XX:+PrintFlagsFinal 2>&1 | grep OptimizeStringConcat
bool OptimizeStringConcat = true {C2 product}
Considering String performance, have a look at the -XX:+PrintStringTableStatistics
and -XX:StringTableSize=
. Java 7 comes with nice features that allow tuning of String cache when using the interned Strings. This way you can optimize the String cache size.
And, a related String Performance Q/A: Java GC tuning for strings