[DGD] Re: A trivial query about the behaviour of local variables

Robert Forshaw iouswuoibev at hotmail.com
Fri Apr 23 17:00:14 CEST 2004


Thanks for the feedback.

>Remember that as the execution thread winds through your code, it might 
>return to this function many times -- most obviously in the case of plain 
>recursion -- and many copies of 'i' must be stored, each one unique for 
>each level of recursion.

I think this says it all. My concern was, as Daniel put it, "if anything, 
you are just saving the allocation space itself, and the time taken to 
allocate/deallocate." Of course the saved time would be insignificant in 
almost any circumstance, and complications would arise when calling a 
function recursively. I'll check out the references mentioned.

_________________________________________________________________
Tired of 56k? Get a FREE BT Broadband connection 
http://www.msn.co.uk/specials/btbroadband

_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list