Re: Re: A non-sucking garbage collector
Christian Tismer <[email protected]> Mon, 19 Jul 2004 23:00:02 +0200
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <[email protected]> |
Mark Hahn wrote: ... > Of course there is a overhead of memory (up to a factor of two) due to > the fact that you need the old arena and the new at the same time. This > is reduced if you have multiple generation arenas and the old isn't > copied. So adding the generational enhancement improves both speed and > memory requirements. I agree this is a simple and efficient scheme to do garbage collection, at the price that you have _all_ object references one level of indirecton away, every pointer from object to object must go through the global object table, and you probably _never_ can rely on any direct reference, if a garbage collection can happen in between. I have no clue how big the cost is. Maybe it is even more efficient than the Python combination of refcounting/generational gc. If you can make sure that gc can happen only at certain times, you can keep references in registers long enough. What stays is the double indirection all over the place. Do you think it is easy to undo this change if it turns out to be inefficient? ciao - chris -- Christian Tismer :^) <mailto:[email protected]> Mission Impossible 5oftware : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9a : *Starship* http://starship.python.net/ 14109 Berlin : PGP key -> http://wwwkeys.pgp.net/ work +49 30 89 09 53 34 home +49 30 802 86 56 mobile +49 173 24 18 776 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/