[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

T and NIL

Efficiency really isn't an issue here because it is very easy to get
CAR and CDR of a symbol NIL to be NIL. Take VAX-NIL for instance,
symbols have two value-cells, so its easy to make CAR access one of
the cells, and CDR the other. One could even arrange to have the symbol
structure reside across a page boundary, so the CAR/CDR cells would be
on a read-only-page, and the function cells, PLIST, and PNAME would be
on a read-write-page. There would be an average of one instruction more
executed in the error-checking version of CAR and CDR. For the benefit
of other lisps I would recomend that the function cell be pure too though.

However, it is interesting that the overloading *was* relatively costly
in terms of codesize for various open-coded primitives in Maclisp.
Doubling the number of instructions for TYPEP, triple for PLIST,
50% more for SYMBOLP. Of course there was a time not very long ago,
(see the "Interim Lisp Manual" AI MEMO by JONL) when the 18 bit address
space of the pdp-10 was said to be more than anyone could want.