Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: The problem with premature optimization...by halley (Prior) |
on Jun 11, 2007 at 14:55 UTC ( [id://620507]=note: print w/replies, xml ) | Need Help?? |
The fact is that, no matter how much you "optimize" this sub -- you could make it instantaneously-fast, or even remove it, and it wouldn't have a significant impact on the global performance at all.
That's a pretty narrow definition of 'global performance' there. Just because it's not the bottleneck in his application doesn't mean you should be happy to burn up CPU cycles endlessly while waiting for the database/network/user/whatever to complete. While I agree that premature optimization is a big waste of development time, at runtime some non-bottleneck optimization does add value. That CPU could be used by another process on the same server, or it could run cooler when there's nothing else to do. --
In Section
Seekers of Perl Wisdom
|
|