Tags and type checking in LISP: hardware and software approaches

One of the major factors that distinguishes LISP from many other languages (Pascal, C, Fortran, etc.) is the need for run-time type checking. Run-time type checking is implemented by adding to each data object a tag that encodes type information. Tags must be compared for type compatibility, removed when using the data, and inserted when new data items are created. This tag manipulation, together with other work related to dynamic type checking and generic operations, constitutes a significant component of the execution time of LISP programs. This has led both to the development of LISP machines that support tag checking in hardware and to the avoidance of type checking by users running on stock hardware. To understand the role and necessity of special-purpose hardware for tag handling, we first measure the cost of type checking operations for a group of LISP programs. We then examine hardware and software implementations of tag operations and estimate the cost of tag handling with the different tag implementation schemes. The data shows that minimal levels of support provide most of the benefits, and that tag operations can be relatively inexpensive, even when no special hardware support is present.

[1]  Theodore W. Houston,et al.  A 553 K-transistor LISP processor chip , 1987 .

[2]  Richard D. Greenblatt,et al.  LISP Machine Progress Report. , 1977 .

[3]  David A. Moon,et al.  Architecture of the Symbolics 3600 , 1985, ISCA '85.

[4]  Guy L. Steele,et al.  Common Lisp the Language , 1984 .

[5]  Mark Horowitz,et al.  Architectural tradeoffs in the design of MIPS-X , 1987, ISCA '87.

[6]  Richard P. Gabriel,et al.  Performance and evaluation of Lisp systems , 1985 .

[7]  Martin L. Griss,et al.  A portable lisp compiler , 1981, Softw. Pract. Exp..

[8]  Tom Gunter,et al.  Microsystems a Microprocessor Architecture for a Changing World: The Motorola 68000 , 1979, Computer.

[9]  Jonathan Rees,et al.  T: a dialect of Lisp or LAMBDA: The ultimate software tool , 1982, LFP '82.

[10]  Guy L. Steele,et al.  Fast arithmetic in MacLISP , 1977 .

[11]  Peter Steenkiste,et al.  LISP on a reduced-instruction-set-processor , 1986, LFP '86.

[12]  Martin L. Griss,et al.  PSL: A Portable LISP System , 1982, LFP '82.

[13]  Rodney A. Brooks,et al.  Design of an optimizing, dynamically retargetable compiler for common Lisp , 1986, LFP '86.

[14]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..

[15]  David Ungar,et al.  The design and evaluation of a high performance Smalltalk system , 1987 .

[16]  Eugene Charniak,et al.  Artificial Intelligence Programming , 1987 .

[17]  Steven W. K. Tjiang,et al.  A 32b microprocessor with on-chip 2Kbyte instruction cache , 1987, 1987 IEEE International Solid-State Circuits Conference. Digest of Technical Papers.

[18]  Jon L. White Reconfigurable, retargetable bignums: a case study in efficient, portable Lisp system building , 1986, LFP '86.

[19]  Peter Steenkiste,et al.  Lisp on a reduced-instruction-set processor: characterization and optimization , 1988, Computer.

[20]  James R. Larus,et al.  Evaluation of the SPUR Lisp architecture , 1986, ISCA '86.

[21]  Jon L. White LISP/370: a short technical description of the implementation , 1978, SIGS.