I would try to write "optimized" code from the very start of the project. I had the attitude "If we are doing it let's do it right". But my concept of "right" was wrong. Clarity is the right target to shoot for at the start. Not optimization.