On Monday 21 April 2008 19:17:34 Bob Rogers wrote:

> The hack is attached; it isn't headerized, has some coding standards
> failures, and leaks memory, so it's incomplete.  Disappointingly, it
> produces an overall speedup of less than 4% in building gen_actions.pir
> in r27087 (which has chromatic's ref-counting speedup).
>
>    And it fails t/pmc/continuation.t test 4 ("continuations preserve
> bsr/ret state"), as expected.  I don't think a 4% speedup is worth it,
> so I'm giving up on it.  Maybe somebody else will find a way to improve
> it.

I'm not sure this approach will work overall.  Despite the word "stack", it's 
a linked list -- and it has to be a linked list, because the call chain of 
continuations isn't a stack.  Most things will work with an array, but once 
in a while you'll get a continuation that wants to go somewhere else than its 
caller when invoked, and you branch the stack then.  If there's a single 
array for all of these, you'll overwrite at least one destination every time 
you get to that depth again.

-- c

Reply via email to