It's faster with the longer string because then you're only appending to the string buffer once rather than thrice. If you want to split them over three lines for readability there are other ways to do so that don't affect performance.