[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Originally posted by Pat Farrell:
This is a classic premature optimization.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Originally posted by Jeanne Boyarsky:
Steven,
The StringBuilder one is slightly more efficient and uses less memory. In practice, it is unlikely to make enough of a difference to matter either way.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Peter Chase:
You don't know this, as the original poster has not told us the context.
Originally posted by Ilja Preuss:
That is, in fact, not true. As far as I know, every (post Java 4) compiler will compile the expression
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Originally posted by Jeanne Boyarsky:
Interesting. Forums are nice. If you post something not true, someone tells you!
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Ilja Preuss:
"I'm not back." - Bill Harding, Twister
"The differential equations that describe dynamic interactions of power generators are similar to that of the gravitational interplay among celestial bodies, which is chaotic in nature."
Originally posted by Jim Yingst:
Personally I find the version using + to be more readable, even if it has escaped quotes. .
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
"I'm not back." - Bill Harding, Twister
http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
Originally posted by Pat Farrell:
This is a classic premature optimization.
http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
Originally posted by Jose Monzon:
It looks like you meant that one shouldn't worry about this unless you have problems with the performance.
Originally posted by Pat Farrell:
I have found that I can always, *always*, improve performance by 50%. I can do it as many times as needed. But worrying about performance before it works is a wasted effort.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Ilja Preuss:
It took me half an hour to find that line of code, and I would never have even guessed that it was this line without running the algorithm through a profiler.
Don't get me started about those stupid light bulbs. |