next up previous
Next: Useful Tip 1 Up: No Title Previous: Some Common Techniques

Efficiency Considerations

The quality of a program depends on 3 main metrics:

  1. How easy it is to read and understand.
  2. The speed with which it performs a given task.
  3. The amount of space it needs to perform the task.

Metric 1 is often the most important for beginners but 2 and 3 are always hanging around in the background and need to be considered explicitly. It isn't easy to lay down precise guidelines for 1, 2 or 3 because they often interact -- a program which is easy to read may not be maximally fast to run -- so it is often necessary to strike a balance. Where this balance lies will depend on the demands of the application for which the program is required. The following are a few useful heuristics:





Dave Stuart Robertson
Tue Jul 7 10:44:26 BST 1998