3 ms·
FWIW I didn't mention/test the -XX:+OptimizeStringConcat, because the place where the changes were being made didn't have that flag enabled and as such wouldn't
by alblue 10y ago
FWIW I didn't mention/test the -XX:+OptimizeStringConcat, because the place where the changes were being made didn't have that flag enabled and as such wouldn't have been representative of the use case behind the blog post.
In any case, I re-ran the benchmarks with -appendJvmArgs -XX:+OptimizeStringConcat and saw no significant difference in the timing on OSX. You can of course run the gist linked at the bottom and see for yourself whether there is an impact for your OS but there is JEP280 which is looking at generating invoke dynamic for Java 9 which will change the measurements again and make the -XX:+OptimizeStringConcat flag obsolete.
- jcdavis 10y ago-XX:+OptimizeStringConcat is enabled by default everywhere I can remember, AFAIK