At 1:37 AM +0200 2/9/02, raptor wrote:
>I was just reading this :
>
>http://www.javalobby.com/clr.html
>
>and a question raised to me. Will Parrot have some optimisation
>(features) that will speed up closures & continuation ?

Closures are a very fundamental thing in perl, and they've got to be 
fast. Luckily they're also pretty simple to optimize, and the core 
design handles them pretty well.

Continuations are a little trickier, but this is where our segmented 
stack architecture comes in handy. A couple of flags on the stack 
chunks and a slightly slower stack push operation and we're fine. 
We're already planning on stack GC and suchlike things, so there's no 
extra cost there.

The one downside to having continuations is it makes optimizing away 
variables, even temp ones, a little tough--on switch to any code that 
might create a continuation we need to flush out from registers to a 
holding area, and on return from code we need to reload from the 
holding area. I think we can cope, though. :)
-- 
                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                       teddy bears get drunk

Reply via email to