At 10:32 AM 5/8/01 -0700, Larry Wall wrote:
>: One of the places I hope to gain some speed is in eliminating flattening
>: and reconstitution of aggregate variables as much as possible. I'm hoping
>: to exploit this really heavily to save both the memory for the flattened
>: lists and the time it takes to flatten and reconstitute. (If we're really
>: lucky we might even be able to rehome some of the underlying data
>: structures, making returning a 10M entry hash cost about one pointer
>: assignment)
>
>I suspect one way this saves us a lot of overhead is in knowing how
>much memory to allocate for a given subroutine's stack frame.  The way
>it is done in Perl 5, we pay the variadic stack overhead even on
>subroutines that are known not to be variadic.  This is suboptimal,
>since you have to be ready to extend the stack at any moment.  (It also
>tends to pessimize linkage into pseudo-variadic languages like C.)

Um, how do you know for sure a subroutine isn't variadic?  Even if it has a 
fixed-length prototype, is Perl smart enough to know that it can't be 
called as an object method, bypassing prototype checking?

--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com

Reply via email to