Re: Promptness of collection
Eliot Moss <[email protected]> Tue, 12 Mar 2013 18:13:27 -0400
| Newsgroups | gmane.comp.programming.garbage-collection.general |
|---|---|
| Message-ID | <[email protected]> |
Dear Jon -- I think the difference you're mentioning has more to do with differences in the smartness of analysis in different compilers than something fundamental about different GC algorithms. The C++ compilers probably aren't as "smart" about noting when a variable becomes dead, and end up deferring the reference count work to the end of the call. This may also be effectively required by C/C++ semantics, in which case I blame it on the language, and again not on the GC algorithm per se. Compilers for functional languages tend to emphasize these kinds of analyses since they allocate so many objects implicitly, which makes the optimizations more important to obtaining good performance at all. In sum, I think it's compiler and language differences, not the different GC algorithms. Regards -- Eliot