Stuart McLachlan
stuart at lexacorp.com.pg
Tue Feb 24 15:05:15 CST 2009
Don't know about VBA, but according to Bob Zale, the overhead in the PowerBasic compiler is exactly one Opcode. :-) -- Stuart On 24 Feb 2009 at 9:09, jwcolby wrote: > Yes, but "return anything" has an overhead implication. At the machine code level, a function has a > storage location somewhere that is set to something when the function returns. The code has to > explicitly set the value of the function return location to something. So MAYBE that "return value > location" is being manipulated, even though when that "something" is "returned" to the caller, it is > not being placed into a set of ears. > > If you explicitly set the return value of the function inside of the function then it definitely > WILL manipulate that return value location. As an example, you might cause a function to return an > error code, even though in some cases the caller never checks for errors. > > To be honest though, computers are so fast that worrying about that overhead doesn't make it onto my > radar. > > John W. Colby > www.ColbyConsulting.com