[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CPS in C (was: Plea for a new old language / Trampolines)



(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