Electrical Engineering
      and Computer Sciences

Electrical Engineering and Computer Sciences

COLLEGE OF ENGINEERING

UC Berkeley

Direct Function Calls in Lisp

Benjamin Zorn and Paul N. Hilfinger

EECS Department
University of California, Berkeley
Technical Report No. UCB/CSD-88-403
February 1988

http://www.eecs.berkeley.edu/Pubs/TechRpts/1988/CSD-88-403.pdf

This paper compares the implementation of direct function calls in SPUR Lisp with the more traditional indirect call implementations found in Maclisp, Franz Lisp, Spice Lisp, Zecalisp, etc. We examine the performance of direct and indirect function calls on the VAX, MC68020, and SPUR architectures. For the SPUR architecture, single indirection slows applications by 3-4%, and double indirection slows applications by 6-8%. The performance benefits of direct function calls are smaller for the VAX and MC68020 architectures. Implementing direct function calls requires maintaining backpointers from each function to all the functions that call it. The additional memory allocated for backpointers ranges from 10-50% of the memory allocated for functions. Maintaining backpointers increases the time to load functions by 10-15%. Redefining a function in a direct call implementation adds up to 50% to the time needed in an implementation with indirect function calls.


BibTeX citation:

@techreport{Zorn:CSD-88-403,
    Author = {Zorn, Benjamin and Hilfinger, Paul N.},
    Title = {Direct Function Calls in Lisp},
    Institution = {EECS Department, University of California, Berkeley},
    Year = {1988},
    Month = {Feb},
    URL = {http://www.eecs.berkeley.edu/Pubs/TechRpts/1988/5379.html},
    Number = {UCB/CSD-88-403},
    Abstract = {This paper compares the implementation of direct function calls in SPUR Lisp with the more traditional indirect call implementations found in Maclisp, Franz Lisp, Spice Lisp, Zecalisp, etc. We examine the performance of direct and indirect function calls on the VAX, MC68020, and SPUR architectures. For the SPUR architecture, single indirection slows applications by 3-4%, and double indirection slows applications by 6-8%. The performance benefits of direct function calls are smaller for the VAX and MC68020 architectures. Implementing direct function calls requires maintaining backpointers from each function to all the functions that call it. The additional memory allocated for backpointers ranges from 10-50% of the memory allocated for functions. Maintaining backpointers increases the time to load functions by 10-15%. Redefining a function in a direct call implementation adds up to 50% to the time needed in an implementation with indirect function calls.}
}

EndNote citation:

%0 Report
%A Zorn, Benjamin
%A Hilfinger, Paul N.
%T Direct Function Calls in Lisp
%I EECS Department, University of California, Berkeley
%D 1988
%@ UCB/CSD-88-403
%U http://www.eecs.berkeley.edu/Pubs/TechRpts/1988/5379.html
%F Zorn:CSD-88-403