At 01:10 PM 4/28/2005, Dan Sugalski wrote:
At 5:57 PM +0200 4/28/05, Robin Redeker wrote:
On Wed, Apr 27, 2005 at 03:43:32PM -0400, Dan Sugalski wrote:
 At 5:40 PM +0200 4/27/05, Robin Redeker wrote:
  The expense is non-trivial as well. Yeah, it's all little tiny bits
 of time, but that adds up. It's all overhead, and useless overhead
 for the most part.

Yes, but do we know whether refcounting is really slower than a garbage collector in the end?
Yes, we do. This is a well-researched topic and one that's been gone over pretty thouroughly for the past twenty years or so. There's a lot of literature on this -- it's worth a run through citeseer for some of the papers or, if you've a copy handy in a local library, the book "Garbage Collection" by Jones and Lins, which is a good summary of most of the techniques, their costs, drawbacks, and implementation details.

Research indicates that in theory, garbage collection can even be faster than explicit memory management. One paper I remember in particular was done by IBM using various GCs for the JVM.

-Melvin



Reply via email to