[net.lang] goto is fast?

mckeeman@wivax.UUCP (05/29/84)

>Some of the tradeoffs between clarity and efficiency in
>programming were treated by Knuth in a Computing Surveys
>article, "Structured Programming with GOTOs."  It appeared
>about 15 years ago.

A curious follow-on to the Knuth article came from Toronto
almost immediately thereafter.  The stated but untested
assumption of most everyone those days was that recursion
was slow.  The Toronto folks ran the Knuth examples in a
bunch of languages in each of the Knuth iterated forms.  In
a large percentage of the cases the go-to versions were
larger and slower than the recursive versions (sounds of
amazement and wonder from the admiring crowd).  I would not
have been surprised on Burroughs equipment but this stuff
ran on PDP-11 and IBM hardware.  I have lost the reference
but I'll bet Dave Wortman or Rick Holt could dig it out (Hi
Dave, Hi Rick).

/s/ Bill   McKeeman.Wang-Inst at CSNet-Relay
           ...decvax!wivax!mckeeman
           Wang Institute of Graduate Studies, Tyngsboro, MA 01879

ron@brl-vgr.ARPA (Ron Natalie <ron>) (05/31/84)

Actually the introduction of non-structured constructs into structured
programming is most often to save SPACE more than anything else.  And
just because you don't have goto's doesn't mean your code is structured.
Most real programmers (which means people who are not just pinko computer
science types writing code for example) don't use fully stuctured programming
at all.

-Ron