--- Luke Palmer <[EMAIL PROTECTED]> wrote: > The overhead you're seeing comes from many things. First, using > prototyped (or unprototyped) functions from in imcc follows the parrot > calling conventions. That is, it uses continuation-passing instead of > bsr, sets a few int registers on the run, and does a savetop/restoretop. > None of these things were in your pasm file. The largest account of > this overhead likely comes from the savetop/restoretop. > > Not to mention, the imcc version is much less clever as far as getting > speed out of things. > > But nonetheless I feel it's worth putting some serious effort > into making sub calls very fast on parrot. That might involve some > minor tweaking of the calling conventions.
I get consistantly much better timings when arguments of prototyped functions (regardless of type, number of arguments, or whether it is a vararg function) are simply all passed in a single PMC array unconditionally. This approach has a number of advantages: it is much simpler, it frees up scratch registers (no need for save, restore, savetop, restoretop and friends), all arguments are in order (counts do not convey argument order when different argument types are involved), no need for counts stored in registers, and it's great for vararg functions (i.e., no need for the new foldup opcode at all). Please consider it. __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/