Re: Return from nested subroutines (still goto discussion)
- Posted by Patrick Barnes <mrtrick at gmail.com> Nov 12, 2004
- 514 views
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. -- MrTrick