next up previous
Next: 2.5 Special Forms Up: 2. THE LISP INTERPRETER Previous: 2.3 Functions

2.4 Machine Language Functions

Some functions instead of being defined by S-expressions are coded as closed machine language subroutines. Such a function will have the indicator SUBR on its property list followed by a pointer that allows the interpreter to link with the subroutine. There are three ways in which a subroutine can be present in the system.

1. The subroutine is coded into the LISP system.

2. The function is hand-coded by the user in the assembly type language, LAP.

3. The function is first defined by an S-expression, and then compiled by the LISP compiler. Compiled functions run from 10 to 100 times as fast as they do when they are interpreted.