TIB: My opinion on loops vs. goto


[Prev][Next][Index][Thread]

TIB: My opinion on loops vs. goto






> > For( can also be used more often in place of labels and whiles.  For( is a
> > relatively, fast, effecient way to do loops.
> >

> 
>   I don't know what calc you use but I shy away from the for loops as often as
> possible, they seep to be the slowest loop on all of the calculators I use.
> Generally well used goto loops work faster than return, while and for loops.
> But a word to the wise: don't stick the goto part in an if statement, then the
> calc starts to really slow down.
> 
> jeff
> 
note: I use a 92

When programming, I use goto statements only when the operator I'm using
requires it. I use only loops and subprograms to "get the job done". My
programs run fast enough to be interesting, and the code is much easier to
follow, especially if it's indented.

Josh
Suggestion: We could write two test programs that do the same thing: The
first one uses loops, and the second one uses goto statements. When we
time them, we can tell which method is better (factors include speed and
size)


References: