Partial Evaluation[Neil D. Jones, Carsten K. Gomard, and Peter Sestoft, Partial Evaluation and Automatic Program Generation, Prentice-Hall, 1993.]
Partial evaluation specializes a function with respect to arguments that have known values. Given a program P(x, y) where the values of variables x are constant, a specializing function mix transforms P(x, y) &rarr P_{x}(y) such that P(x, y) = P_{x}(y) for all inputs y. P_{x}(y) may be shorter and faster than P(x, y) . We call x static data and y dynamic data. .
Partial evaluation involves:
Partial evaluation improves execution time by a (possibly large) constant factor, by increasing the binding between a program and its execution environment.