May 05

A smarter brain than mine at work, pointed out this interesting article to me.
Java String Performance testing
It talks about string performance testing. I could make sense of most of the observations made in this test and thought of sharing it.

In short the test compares string operations like “+”, “new String” and then “+”, “+” with fields and then StringBuffer append. One of the conclusions of the test is

the ‘+’ operator is not evil when used with Strings

I agree with this statement and a look at the generate byte code pretty much convinces us of so. But, a word of caution here, it always makes sense to check this on our target compiler before committing to it. Continue reading »

Tagged with:
preload preload preload