>Hi ,
> i got through ur question .for calling a function alot of time su
can use this recursion wheather it depends .by this functin u can reduce ur
lines of codes .again the memory spaces .I am MCA STUDENT OF 1ST yr i am
trying for ur better aswer then......
> bye
Reducing lines of code and memory usage is not a legitimate reason to use
recursion. An algorithm should support recursion in the first place to
even consider the approach, but I don't recommend it. Function calls tend
to be expensive, but so is allocating memory. A good tradeoff can be made
if fewer calls are made to the memory allocator asking for larger chunks of
memory. You can really increase performance if you pre-calculate how much
memory you think you need and then allocate it all in one call. Of course,
with dynamic memory acting as a stack, you have to be careful to not
overflow that (not too hard if someone knows what they are doing).
Thomas J. Hruska
[EMAIL PROTECTED]
Shining Light Productions
Home of the Nuclear Vision scripting language and ProtoNova web server.
http://www.slproweb.com/
To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/c-prog/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
