Contents    Page-10    Prev    Next    Page+10    Index   


Program optimization can be defined as follows:

Given a program P, produce a program P' that produces the same output values as P for a given input, but has a lower cost.

Typical costs are execution time and program space. Most optimizations target time; fortunately, the two usually go together.

Optimization is an economic activity:

It is not possible to optimize everything. The goal is to find leverage: cases where there is a large expected payoff for a small cost.