Related articles |
---|
[12 earlier articles] |
Re: Best Ref-counting algorithms? torbenm@pc-003.diku.dk (2009-07-15) |
Re: Best Ref-counting algorithms? cr88192@hotmail.com (BGB / cr88192) (2009-07-15) |
Re: Best Ref-counting algorithms? cr88192@hotmail.com (BGB / cr88192) (2009-07-15) |
Re: Best Ref-counting algorithms? cr88192@hotmail.com (BGB / cr88192) (2009-07-15) |
Re: Best Ref-counting algorithms? cr88192@hotmail.com (BGB / cr88192) (2009-07-15) |
Re: Best Ref-counting algorithms? gene.ressler@gmail.com (Gene) (2009-07-15) |
Re: Best Ref-counting algorithms? torbenm@pc-003.diku.dk (2009-07-16) |
Re: Best Ref-counting algorithms? bartc@freeuk.com (BartC) (2009-07-16) |
Re: Best Ref-counting algorithms? gneuner2@comcast.net (George Neuner) (2009-07-16) |
Re: Best Ref-counting algorithms? haberg_20080406@math.su.se (Hans Aberg) (2009-07-17) |
Re: Best Ref-counting algorithms? haberg_20080406@math.su.se (Hans Aberg) (2009-07-17) |
Re: Best Ref-counting algorithms? cppljevans@gmail.com (Larry) (2009-07-17) |
Re: Best Ref-counting algorithms? lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2009-07-17) |
[15 later articles] |
From: | torbenm@pc-003.diku.dk (Torben =?iso-8859-1?Q?=C6gidius?= Mogensen) |
Newsgroups: | comp.compilers |
Date: | Thu, 16 Jul 2009 09:39:51 +0200 |
Organization: | Department of Computer Science, University of Copenhagen |
References: | 09-07-018 09-07-039 |
Keywords: | GC |
Posted-Date: | 16 Jul 2009 18:33:52 EDT |
George Neuner <gneuner2@comcast.net> writes:
> If you're dead set on reference counting, you should investigate 1-bit
> reference counting. I don't have URL's to give you but they should be
> easy to find. The programming language is designed so that most data
> are not shared and then you only need a simple flag to say whether the
> item is shared and so needs special handling.
You can get most of the benefit of 1-bit reference counts by using
linear-type inference. Basically, at compile time you find objects that
you can statically guarantee will have only one use _and_ (most of the
time) code the reuse directly in the compiled code instead of putting
the objects on a free list for later reuse. Non-linear objects are
GC'ed normally.
Torben
Return to the
comp.compilers page.
Search the
comp.compilers archives again.