Christian Walde wrote: >I do think that, instead of forcing people to do `sp -= items;` just >to be able to iterate forwards through arguments with ++, someone >would probably have instead just made a macro that points to the >start of the arguments in the stack. This is one of the things that arises from efficiency concerns. You could replace sp[3] (used after sp-=items) with sp[3-items] (with no decrement of sp), but it's a more complex expression, which depending on CPU architecture may take longer to execute. (It'll be the same on current x86 CPUs.) The decrement also gets you into the right place to start pushing return values. Decrementing sp is part of the stereotyped variable use that you'd likely reinvent, at least for variadic xsubs. -zeframThread Previous | Thread Next