Finite Differencing
Finite differencing[Paige, R. and Koenig, S., ``Finite Differencing of Computable Expressions'', ACM Transactions on Programming Languages and Systems, vol. 4, no. 3 (July 1982), pp. 402-454] is a general technique for optimizing expensive computations f(i) that occur in a loop:
Example: f(i) = i2
i | 0 | 1 | 2 | 3 | 4 | 5 | |||||
i2 | 0 | 1 | 4 | 9 | 16 | 25 | |||||
first difference: | 1 | 3 | 5 | 7 | 9 | ||||||
second difference: | 2 | 2 | 2 | 2 | |||||||
Contents    Page-10    Prev    Next    Page+10    Index