Piers Cawley wrote:
I argue that we have the problems we do (incorrect behaviour of continuations, horrible allocation performance) because we chose the wrong optimization in the first place. The stack optimizations that are in place make sense when you don't have continuations, but once you do, the cost of allocating a continuation and maintaining all that COW complexity becomes prohibitive. I strongly advocate rejigging the stacks so that one stack frame = 1 stacked thing + 1 link to the next thing in the chain. No need for COW, no need for memcpy when allocating continuations, no worrying complexity to deal with while you're trying to get the behaviour right. Oh, an no need for RetContinuations either.
I feel like Piers has asked this several times and never gotten an answer about why it is (or is not) a good idea. I agree with him that it is a good idea, but I am far from an authoritative source.
Also, Piers didn't you implement this once already? If could you update it to the current system without too much trouble? It would be nice to have numbers on this approach.
Matt