The third rule: Don't Optimize More Than You Need To
Even if a program you've written needs some optimization, you should focus your effort on the parts that need to be optimized.
Even in those parts, you should optimize enough to fix the performance problems you've measured, but you shouldn't waste your time trying to make any part of the program substantially more efficient than it needs to be.
Life is short, and there are other programs that need to be optimized or written. If you waste your time over-optimizing a program, you won't be as productive as you should be.