Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ucla-cs!zen!ucbvax!cs.vu.nl!biep From: biep@cs.vu.nl ("J. A. "Biep" Durieux") Newsgroups: comp.ai.digest Subject: Re: Garbage Collection Suppression Message-ID: <824@klipper.cs.vu.nl> Date: Wed, 22-Jul-87 10:28:51 EDT Article-I.D.: klipper.824 Posted: Wed Jul 22 10:28:51 1987 Date-Received: Tue, 28-Jul-87 00:47:55 EDT References: <8707202143.aa23792@Dewey.UDEL.EDU> Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: "J. A. \"Biep\" Durieux"Distribution: world Organization: VU Informatica, Amsterdam Lines: 16 Approved: ailist@stripe.sri.com In article <8707202143.aa23792@Dewey.UDEL.EDU> Chester@UDEL.EDU writes: >The direct way to avoid garbage collection in lisp is to define your own `cons' >function that prefers to get cell pairs from an `available list' (...). Also handy in many cases (small functions like append, alist-functions, subst) is icons: (defun icons (a d cell) (cond ((and (eq (car cell) a) (eq (cdr cell) d)) cell) (t (cons a d)))) In this way whenever it turns out the new cells weren't really needed, the old ones are used again (as in (append x nil)). Be aware, however, that your copy-function may not work any more if it's defined as (subst nil nil x)! -- Biep. (biep@cs.vu.nl via mcvax) Never confound beauty with truth!