efficiency « StringBuilder « Java Data Type Q&A





1. StringBuilder vs String efficiency    forums.oracle.com

SpaceShuttle wrote: this is a multi-threaded application that does this operation atleast several hundred times Several hundred times is nothing. Not worth worrying about. Here's a little back-of-the-envelope calculation that explains why: your computer has what, let's say a 2 gigahertz processor? Put in the real number, it won't make much difference. That means it can do 2 billion operations per ...