Leopold Toetsch <[EMAIL PROTECTED]> writes:

> Larry Wall <[EMAIL PROTECTED]> wrote:
>> On Fri, Mar 19, 2004 at 08:57:28AM +0100, Leopold Toetsch wrote:
>
>>: I'd like to have, if possible a clear indication: that's a plain
>>: function or method call and this is not. I think the possible speedup is
>>: worth the effort.
>
>> I have no problem with "plain" being the default.  I suppose you could
>> declare it explicitly if you like:
>
>>     sub foo () is plain {...}
>
>> Then obviously the other kind would be:
>
>>     sub bar () is peanut {...}
>
> There is of course no need to declare the default, which will be very
> likely beyond 99%. I won't discuss P6 syntax here, which could lead to
>
>   sub bar() will reuse_P1 { ... }
>
> Piers' statement was related to solving the halting problem, which isn't
> really positive. I don't throw or catch pies, but CPS returns are
> currently the major performance loss Parrto has.

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.

Reply via email to