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.
[1]
E. Saint-James.
Recursion is more efficient than iteration
,
1984,
LFP '84.
[2]
Henry G. Baker,et al.
Shallow binding in Lisp 1.5
,
1978,
CACM.
[3]
Wolfram-Manfred Lippe,et al.
Optimiizing Static Scope Lisp by Repetitive Interpretation of Recursive Function Calls
,
1987,
IEEE Transactions on Software Engineering.
[4]
Patrick Greussay,et al.
Iterative interpretation of tail-recursive LISP procedures
,
1978,
LISPB.
[5]
Wolfram-Manfred Lippe,et al.
Dynamic optimization of covered tail recursive functions in applicative languages
,
1986,
CSC '86.