only when you call them, since they check if they have to pass values to the function, and the difference is miniscule, unless you have lots (several thousand calls) in the main loop and you want the last ounce of speed so you can just get 30fps then the difference is not that great, it does exist though, I have altered code to pure goto`s before now to get the last drop of speed, not a gosub or function in sight, (this was mid 70`s, interpreted basic) murder to debug though and you need a duplicate of every function for every call you make from another location, modern compilers probably optimise the code heavily for things like that anyway, linear flow code was the kittys do-dahs for speed fiends at one time (so was/is? self modifying code), nowdays a C++ compiler can optimise to a level that equals hand assembled programs in most cases, and they get better by the year as more is researched on code optimiseation, C++ and all that OOP looks messy and ineficient to old hands like me, but the compiler cleans it up and converts it into sleek well structured assembler in no time, well, not if you call overnight compiles "no time"
but you get the idea
Mentor.
SteveV: umm! yeah! then you run out of stack
, the trouble is that the stack is not that large by modern standards, you have to remember that the modern PC is actualy an archaic 1/2mb PC running fancy memory management to make it look to the software like you have 256mb or whatever, but under all that apparently continous memory the poor old PC is still swapping pages of memory like the clappers and franticaly trying to stuff data into programs in 16k chunks, only Macs and the late lamented (by me anyway) Amiga had true continous memory up into the gigabyte range that was addressed directly, you try programming in original C in DOS (been there done that), first thing you need to learn for large programs is how to manage the memory pages, on an Amiga you could just set the stack to whatever you liked, with a max of 16k directly addressable you can`t do that on a PC.