Re: Return from nested subroutines (still goto discussion)
- Posted by "Kat" <gertie at visionsix.com> Nov 12, 2004
- 489 views
On 13 Nov 2004, at 0:25, Patrick Barnes wrote: > > On Fri, 12 Nov 2004 05:14:42 -0800, Derek Parnell > <guest at rapideuphoria.com> wrote: > > > If I'm right, performance is not the main question here. > > > Using GOTO this way, i.e. jumping out of procedures will corrupt the > > > stack, no? So this should not be done anyhow, should it? Please correct me > > > if I'm wrong. > > > > It depends. A sophisticated compiler might recognise that the flow has > > transferred from the current stack frame and compensate for that. > > If it would do that, it'd have to restore the stack, which would take > a bit of execution time, too. Not everything about GOTO is fast. Jumping into/out of proceedures has never been on my wish list, quite the contrary. Kat