Kernel LISP - how low down can it go?

Henry G. Baker
Thu, 22 May 1997 00:01:15 -0700 (PDT)

> >So if I have an immutable list (a b c d e f), then I can re-implement that
> >in my garbage collector, or wherever into a vector. If they share type
> >then we can even make this into a simple-vector, and save both space
> >and improve speed.
> Is this going to help very often? Your typical recursive lisp function
> cdr's down a list, which would mean a copy of the vector every time in
> order to strip off the first element.
> Has anyone done any research to figure out if the savings are real or
> imaginary?
> BTW, we could do lots more optimisations by making lisp a fully typed
> language, but of course we don't like that. Isn't this a bit of a dent
> in the philosophy, of letting the user do what they like with minimal
> specification, and letting the compiler just doing it's best to figure
> it out the best optimisation?

I don't think he was suggesting that you make _every_ immutable list
into a vector; only that some immutable lists might profit from such
a thing.

Actually, for the most part I wouldn't advise making most immutable
cons cells into vectors, since one still has to worry about recursing
down a list with CDR's, so it would be nice if this were reasonably

Henry Baker
www/ftp directory URL: