Performance Analysis (cont)
Strategy for developing efficient programs:
- Design the program well*
- Implement the program well**
- Test the program well
- Only after you're sure it's working, measure performance
- If (and only if) performance is inadequate, find the "hot spots"
- Tune the code to fix these
- Repeat measure-analyse-tune cycle until performance ok
* see "Algorithms" Sedgewick, Cormen/Leiserson/Rivest
** see "Programming Pearls", "Practice of Programming"
|