[comp.lang.lisp] Type desclaration in common lisp

pazzani@pan.ics.uci.edu (Michael Pazzani) (01/05/91)

Do any of the texts on commonlisp have a practical
discussion of how to declare types in commonlisp
to increase execution speed of compiled code by
eliminating run-time type checking.  I realize this
depends to some extent on the compiler.  Ideally,
I'd like to find a chapter or section suitable
for student use discussing this topic.


Thanks
Mike

(pazzani@ics.uci.edu)

hall@aplcen.apl.jhu.edu (Marty Hall) (01/07/91)

In article <27851074.15786@ics.uci.edu> pazzani@ics.uci.edu (Michael Pazzani) writes:
>Do any of the texts on commonlisp have a practical
>discussion of how to declare types in commonlisp
>to increase execution speed of compiled code by
>eliminating run-time type checking.  I realize this
>depends to some extent on the compiler.  Ideally,
>I'd like to find a chapter or section suitable
>for student use discussing this topic.

Charniak, et al's _Artificial Intelligence Programming_ (Lawrence Erlbaum) has
a brief discussion of this starting at page 105. Peter Norivg's upcoming
_Paradigms of AI Programming_ (Morgan Kaufmann, coming this year) also
discusses this and has an excellent chapter on efficiency issues in general.

Perhaps the docs for the LISP you are using has some specific advice for that
compiler? Also, using "disassemble" while trying various declarations may
help the motivated student.

						- Marty Hall
------------------------------------------------------
hall@aplcen.apl.jhu.edu, hall%aplcen@jhunix.bitnet, ..uunet!aplcen!hall
Artificial Intelligence Lab, AAI Corp, PO Box 126, Hunt Valley, MD 21030