>>But doing so I, of course, broke all the existing code we already have, so I'm up to serious changes. That would be an opportunity to re-visit code I've written and optimize while looking at it.
>
>And that is exactly why you should not bother trying to over-optimize a bit of code. Once everything is working fine and then tests reveal that you really really need to somehow squeeze a millisecond from somewhere, then you can look again at this piece of code, at least that is what I would do (and I know that Mike Y. is gritting his teeth while reading this:)).
Well, when I look at the code and find something that may be written better, I usually change it while I am looking at the code, not at some late point. That's just how I usually approach code, even at the risk of breaking working stuff.
If it's not broken, fix it until it is.
My Blog