2 ms·
It's not as simple as he makes out. I had a look at the + operator and compiler optimizations back in 2005. Basically, depending on exactly how you setup your s
by nl 17y ago
It's not as simple as he makes out. I had a look at the + operator and compiler optimizations back in 2005. Basically, depending on exactly how you setup your strings javac is able to do some optimization. Note that this is a compile time optimization, so compiling with Eclipse (for example) will probably give different result.
Anyway, some details are at http://nicklothian.com/blog/2005/06/09/on-java-string-concatenation/ http://nicklothian.com/blog/2005/06/09/on-java-string-concat...