- The first rule of Optimization Club is, you do not Optimize.
- The second rule of Optimization Club is, you do not Optimize without measuring.
- If your app is running faster than the underlying transport protocol, the optimization is over.
- One factor at a time.
- No marketroids, no marketroid schedules.
- Testing will go on as long as it has to.
- If this is your first night at Optimization Club, you have to write a test case.
(Adapted from separate lists by David Fetter and Michael Schwern.)
When you are thinking about rule #2, you reach for Devel::NYTProf.
Rule #7 demands an addition to your test suite, which means delving into Test::More or, if you prefer, Test::Most.
One rule that doesn't fit in the rules format: If your code doesn't do what you want it to do, you have no business optimizing it.