A General Approach to the Optimization of Function Calls

This paper presents a general approach to the optimization of function calls. We define the class of "low cost function calls" and introduce a technique of detecting and executing these calls in a modified shallow binding system known as "standardized shallow binding". We show that by this technique the overhead expenses of changing environments for low cost calls are nearly cut down to zero. The new method can be applied to any imperative or applicative language. In this paper statically scoped LISP is taken as an example; it is shown how the technique has been applied in the implementation of a LISP interpreter. We also prove that our method exceeds a number of optimizations that have been proposed recently.