The Parrot is dead. Long live the Parrot?

Michael Schroeder mls at suse.de
Wed Feb 13 14:21:56 UTC 2013


On Wed, Feb 13, 2013 at 08:50:33AM -0500, Andrew Whitworth wrote:
> You'd have to rip out CallContext and the entire PCC system, and
> replace it all with NQP's dispatcher and argument binder (which,
> again, would need to be rewritten to account for this missing
> infrastructure). If you can do this, you'll see a nice performance
> bump in every single method invocation, which will make for much
> speedier programs and much snappier compilation times of the Perl6
> core.

IMHO the problem with the current implementation is that it creates
three PMCs for every call:
- the call context, which holds all of the registers
- the return continuation
- in most cases a lexpad, which is in fact not needed for rakudo

The profiling I did some time ago indicated that that's mostly why
calling a function is so slow. A long time ago the call context
was not a PMC, making it a PMC may have been the code somewhat
cleaner, but I think it was a mistake performance wise.

The return continuation could also be integrated into the call
context, I once did that as quick hack and got a 16% speed
improvement AFAIR.

The lexpad should be optional instead of mandatory. For rakudo,
the lexinfo and the call context is all that's needed for the
lexical lookups.

Just my 2 cents about the call overhead,
  Michael.

-- 
Michael Schroeder                                   mls at suse.de
SUSE LINUX Products GmbH,  GF Jeff Hawn, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}


More information about the parrot-dev mailing list