[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CPS in C (was: Plea for a new old language / Trampolines)
- To: address@hidden
- Subject: Re: CPS in C (was: Plea for a new old language / Trampolines)
- From: felix <address@hidden>
- Date: Wed, 14 May 2003 23:42:37 +0200
- Sender: address@hidden
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529
(Sorry, I lost the followup somehow)
Mike Newhall wrote:
>It looks very fast. Potential drawbacks are
>1) your GC alg choices are somewhat constrained and
>2) the "alloca hack" for resetting the stack pointer doesn't seem like a portable technique.
What's fast is mainly allocation (effectively you have a dedicated hardware
register as your allocation-pointer, portably) and continuations (naturally).
To 1:
Not necessarily, I think. Currently Chicken uses a 2-generation GC that has the nursery on the
C-stack and the second generation in the heap (as Appel proposed in Baker's
paper).
To 2:
You don't have to do that. You just longjmp(). Or you might even just `return'.
cheers,
felix