Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Argument starter - The roots of all evil
Message
From
16/09/2004 09:10:51
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00938079
Message ID:
00942862
Views:
26
>One thing of note, however. A non-recurisve solution usually is faster (not that it matters much). This is because you don't have the push-pop mechanism going on all the time.

But then, you have other things you had to code to replace recursion, so I figure these should make up for some of the difference in speed. These would probably be lighter things, like a few more variables and a do-while loop, and I expect the end result would be what you said - recursive solution's speed dropping with the number of iterations, or being just constantly slower because of the overhead.

The big argument against recursion would be the case when you have to pass large arrays, heavy objects or lots of parameters to a recursing function. It's going to curse and re-curse at you for that :).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform