You are given a heap of code in your favorite language which combines to form a rather complicated application. It runs rather slowly, and your boss has asked you to optimize it. **What are the steps you follow to most efficiently optimize the code?** 

What strategies have you found to be **unsuccessful** when optimizing code?

**Re-writes**: At what point do you decide to stop optimizing and say "This is as fast as it'll get without a complete re-write." In what cases would you advocate a simple complete re-write anyway? How would you go about designing it?