At 10:38 PM +0100 3/18/04, Leopold Toetsch wrote:
Dan Sugalski <[EMAIL PROTECTED]> wrote:
At 4:10 PM -0500 3/18/04, Mitchell N Charity wrote:
It seemed nontrivial to reduce the number return continuation pmc's
used in oofib.imc.  So I instead added an _extra_, unused one, to the
two already used in each fib method.

Parrot ran 30% slower. (Optimized, unoptimized, and jit)

Which suggests return continuation pmc driven memory management costs
(gc and allocation) are currently a major, perhaps even dominant,
factor in method invocation speed.

 Yow. Okay, thanks. That means it's time to dive into the think tank
 and see what we can do about that.

Which brings up again my warnocked question: How can return continuations get reused?

Works like this. (No pasm, but it should be obvious)


 sub a:
  build return continuation X
  call sub b
  do processing
  return

 sub b:
   do some processing
   take continuation Y
   store Y in global variable Z
   exit

 main:
  call sub a
  grab continuation Y from variable Z
  invoke continuation Y

If a continuation's taken from within a sub somewhere, return continuations may (probably will) be used multiple times, once for the original return then once for each time the continuation is invoked.
--
Dan


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

Reply via email to