Re: Best Ref-counting algorithms?

=?ISO-8859-1?Q?Christoffer_Lern=F6?= <lerno@dragonascendant.com>
Tue, 14 Jul 2009 08:41:07 -0700 (PDT)

          From comp.compilers

Related articles
Best Ref-counting algorithms? lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2009-07-12)
Re: Best Ref-counting algorithms? haberg_20080406@math.su.se (Hans Aberg) (2009-07-13)
Re: Best Ref-counting algorithms? lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2009-07-13)
Re: Best Ref-counting algorithms? cr88192@hotmail.com (BGB / cr88192) (2009-07-13)
Re: Best Ref-counting algorithms? torbenm@pc-003.diku.dk (2009-07-14)
Re: Best Ref-counting algorithms? lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2009-07-14)
Re: Best Ref-counting algorithms? haberg_20080406@math.su.se (Hans Aberg) (2009-07-14)
Re: Best Ref-counting algorithms? georgeps@xmission.com (GPS) (2009-07-14)
Re: Best Ref-counting algorithms? gneuner2@comcast.net (George Neuner) (2009-07-14)
Re: Best Ref-counting algorithms? DrDiettrich1@aol.com (Hans-Peter Diettrich) (2009-07-15)
Re: Best Ref-counting algorithms? lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2009-07-14)
Re: Best Ref-counting algorithms? lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2009-07-15)
[28 later articles]
| List of all articles for this month |
From: =?ISO-8859-1?Q?Christoffer_Lern=F6?= <lerno@dragonascendant.com>
Newsgroups: comp.compilers
Date: Tue, 14 Jul 2009 08:41:07 -0700 (PDT)
Organization: Compilers Central
References: 09-07-018 09-07-032
Keywords: GC
Posted-Date: 14 Jul 2009 14:22:52 EDT

On Jul 14, 9:45 am, torb...@pc-003.diku.dk (Torben Fgidius Mogensen)
wrote:
> Christoffer Lernv <le...@dragonascendant.com> writes:
> > If one would like to implement a fast GC using refcounting, should I
> > implement something like in those papers, or are there better
> > algorithms out there?
>
> If you want to implement a fast GC, you should not use refcounting. The
> main problem with refcounting is that an assignment to a pointer
> variable (which would otherwise just be a register-to-register transfer)
> requires two memory reads, two memory writes and a conditional jump, so
> it stresses the memory system far more than most other GC algorithms.


Would it not be possible to use escape analysis and deferred ref-
counting to improve that by quite a bit?


I was also thinking about Objective C pre 2.0 with manual ref-
counting. My impression was always that updating the ref-count
happened rather rarely.
If you really only need to change the ref-count is when you are
assigning to the member variables of other objects, then will the cost
really be that great in comparison to other factors? Can you perhaps
also make it faster by deferring the ref-count or loading it into a
register?


I guess I am a bit fascinated by the real-time guarantees (more or
less) offered by a ref-count based GC.



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.