$ perl tools/dev/parrotbench.pl -c=parrotbench.conf -b=^oo Numbers are relative to the first one. (lower is better) parrotj parrot parrotC perl-th perl python ruby oo1 100% 107% 105% 142% 118% 76% 102% oo2 100% 108% 106% 145% 121% 71% 104% oofib 100% 143% 127% 243% 207% 139% 131%
Object creation is still a bit too slow, but method calls now rock.
I think the numbers above are clearly indicating that we should try to keep this scheme, *if* ever possible.
WRT the problem with Continuations that cause reusing of return continuations (which isn't possible when these are recycled):
Return continuations are only recycled if created by: - invokecc - callmethodcc - delegated vtables like __init - exceptions
So (currently) if you use a Continuation and a subroutine would exit multiple times through the same P1, then create the return continuation explicitely:
newsub $P1, .RetContinuation, ret_label
and pass the C<$P1> on as second argument to the pcc_call sequence
.pcc_call sub, $P1 # or .meth_call
This is a current workaround.
Further if something really breaks, you can turn off both optimizations in objects.c:777 by setting these defines to 1:
#define DISABLE_METH_CACHE 0 #define DISBALE_RETC_RECYCLING 0
leo