Tags and type checking in LISP: hardware and software approaches
- 1 October 1987
- journal article
- Published by Association for Computing Machinery (ACM) in ACM SIGOPS Operating Systems Review
- Vol. 21 (4), 50-59
- https://doi.org/10.1145/36204.36183
Abstract
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.Keywords
This publication has 14 references indexed in Scilit:
- A 553K-transistor LISP processor chipPublished by Institute of Electrical and Electronics Engineers (IEEE) ,1987
- A 32b microprocessor with on-chip 2Kbyte instruction cachePublished by Institute of Electrical and Electronics Engineers (IEEE) ,1987
- Reconfigurable, retargetable bignumsPublished by Association for Computing Machinery (ACM) ,1986
- Design of an optimizing, dynamically retargetable compiler for common LispPublished by Association for Computing Machinery (ACM) ,1986
- Architecture of the Symbolics 3600ACM SIGARCH Computer Architecture News, 1985
- PSLPublished by Association for Computing Machinery (ACM) ,1982
- T: a dialect of Lisp or LAMBDAPublished by Association for Computing Machinery (ACM) ,1982
- A portable lisp compilerSoftware: Practice and Experience, 1981
- A theory of type polymorphism in programmingJournal of Computer and System Sciences, 1978
- LISP/370ACM SIGSAM Bulletin, 1978