Lisp Compilation
Compilation allows Lisp programs that have been
debugged to run
roughly 10 times faster than interpreted Lisp. There are
several factors that account for the speedup:
- Many basic Lisp functions (e.g., car, cdr, null?,
eq?) can be compiled directly as in-line
machine code. This saves the overhead of function calls.
- Function calls can be speeded up by eliminating information that is
saved on the stack during interpretation. (This may prevent use of
debugging aids such as tracing.)
- Variable binding lookup can be eliminated by
keeping local variables in special locations (e.g.,
registers).
- Tail-recursive functions can be converted to iterative functions
by the compiler.
Contents   
Page-10   
Prev   
Next   
Index