Implementing LISP in C++ (

Kai Henningsen Kai_Henningsen at ms.maus.de
Tue Apr 23 05:53:00 AEST 1991


bp>One thing to consider doing; When the reference count goes to zero put
bp>the object on a type specific free list. When you need a new object of
bp>a given type try to get it from its type specific free list first.
bp>This way your not always going through the general purpose heap code.
bp>Avoiding the general purpose code can give you a real performance
bp>boost.

There's still another thing: look out for circular data structures. Once you
have a circle in your data, the reference count will *never* go back to zero.
Such storage can only be reclaimed by other methods. (Well, there *is* a way
*if* you *know* that you can throw away such a circle; break up the circle
before "forgetting" it.)

MfG Kai



More information about the Comp.lang.c mailing list