This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Lars Arvestad <arve@nada.kth.se> writes: > GH> I'm going to be pedantic, and point out that ref counting is a form of > GH> garbage collection ;) Ref counting can work quite well when you have a > GH> large set of `simple' data (most importantly, no circular references), > GH> which I guess describes a database pretty well. > > What about the issue of space utilization? Which scheme (not in the > guile sense!) is most space efficient? If most data is stored in > immediate types, only a couple of bits per datum is sacrificed in Guile, > whereas in ref-counting systems you have to have something like a word > for each datum. Or am I missing something? Yeah, you don't need to refcount immediates. How much space you actually need for each refcount is another application dependant thing (you might be able to get away with a few bits). > How much does > non-ref-counting GC cost in space utilization? > The current gc is pretty cheap in this regard... ignoring the amount of space to keep track of heap segments themselves, the cost is basically 1 bit per heap object (for the gc mark). For what I'm doing with the gengc right now, the cost is around 4 words for 60 heap words. This ignores the cost of keeping track of pointers from old to young objects, though, and the amount of actual allocated heap space in either (though this should be quite a bit smaller for a gengc). -- Greg