comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: No Go To's Forever!
Date: 2000/03/22
Date: 2000-03-22T00:00:00+00:00	[thread overview]
Message-ID: <8b9da2$ilv$1@nnrp1.deja.com> (raw)
In-Reply-To: TnVB4.10962$624.1043257@news.flash.net

In article <TnVB4.10962$624.1043257@news.flash.net>,
  "Ken Garlington" <Ken.Garlington@computer.org> wrote:
> "Robert Dewar" <robert_dewar@my-deja.com> wrote in message
> news:8b93n3$8ai$1@nnrp1.deja.com...
>
> > <<Is goto statments particular slow?>>
> > No, the concern is not for efficiency at all!
>
> You're the expert, of course, but I'm surprised by this
answer. I thought
> that structured code in general allowed for easier
determination of scope,
> making certain optimizations more likely to be applied.


Well that is true in some cases, but if gotos are simply used
to duplicate more rational control structures, then typical
optimizers are not affected. For example, for the two pieces
of code here (the original version with a goto, and the
replacement version with a loop), most optimizers will produce
identical code.

I really think that the concern with not using gotos has nothing
to do with efficiency. Indeed, it takes a very strong optimizer
to recover the efficiency of a goto in some cases. FOr example,
consider the two representations of a finite state machine

   <<state1>> .... goto state2;

   case state1 is ....  current_state := state2;

it is quite difficult for an optimizer to recover the goto
structure from the case statement, and indeed I have not worked
with any compiler that manages to eliminate the loop and case
statement in the second case.


Sent via Deja.com http://www.deja.com/
Before you buy.




  parent reply	other threads:[~2000-03-22  0:00 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-21  0:00 No Go To's Forever! Bill Dale
2000-03-21  0:00 ` Charles Hixson
2000-03-21  0:00   ` Gautier
2000-03-21  0:00   ` Robert Dewar
2000-03-21  0:00     ` Michael P. Walsh
2000-03-21  0:00       ` Andrew Berg
2000-03-22  0:00         ` Wes Groleau
2000-03-22  0:00           ` No Go To's Forever! (I'm sorry I spoke...) dis90072
2000-03-23  0:00             ` tmoran
2000-03-23  0:00               ` Larry Kilgallen
2000-03-22  0:00     ` No Go To's Forever! Ken Garlington
2000-03-22  0:00       ` Marin D. Condic
2000-03-22  0:00         ` Roger Barnett
2000-03-22  0:00           ` Larry Kilgallen
2000-03-23  0:00             ` Robert Dewar
2000-03-23  0:00         ` Keith Thompson
2000-03-24  0:00           ` Ted Dennison
2000-03-27  0:00             ` Keith Thompson
2000-03-28  0:00               ` Come From Forever! (was: No Go To's Forever!) Ted Dennison
2000-03-29  0:00                 ` Keith Thompson
2000-03-24  0:00           ` No Go To's Forever! Marin D. Condic
2000-03-25  0:00           ` Richard D Riehle
2000-03-22  0:00   ` Tim Gahnström
2000-03-21  0:00     ` David Starner
2000-03-22  0:00     ` Robert Dewar
2000-03-22  0:00       ` Ken Garlington
2000-03-21  0:00         ` Keith Thompson
2000-03-22  0:00         ` Robert Dewar [this message]
2000-03-22  0:00         ` Robert Dewar
2000-03-23  0:00           ` Ken Garlington
2000-03-23  0:00       ` Tim Gahnstr�m
2000-03-22  0:00     ` tmoran
2000-03-22  0:00       ` Robert Dewar
2000-03-22  0:00         ` tmoran
2000-03-23  0:00           ` Robert Dewar
2000-03-23  0:00             ` tmoran
2000-03-23  0:00               ` Robert Dewar
2000-03-23  0:00                 ` tmoran
2000-03-24  0:00                   ` Robert Dewar
2000-03-24  0:00                     ` Robert Dewar
2000-04-16  0:00                     ` Kenneth Almquist
2000-04-17  0:00                       ` Robert Dewar
2000-04-18  0:00                         ` Dale Stanbrough
2000-04-18  0:00                           ` Robert Dewar
2000-04-18  0:00                           ` David Starner
2000-04-17  0:00                       ` Robert Dewar
2000-03-23  0:00                 ` Jeff Carter
2000-03-24  0:00                   ` Robert Dewar
2000-03-29  0:00                 ` Martin Dowie
2000-03-29  0:00                   ` Robert Dewar
2000-03-29  0:00                   ` Robert Dewar
2000-03-29  0:00                   ` Florian Weimer
2000-03-29  0:00                     ` Robert Dewar
2000-03-30  0:00                       ` Robert A Duff
2000-04-01  0:00                         ` Robert Dewar
2000-04-01  0:00                           ` Robert A Duff
2000-04-02  0:00                             ` Robert Dewar
2000-04-21  0:00                       ` Florian Weimer
2000-04-21  0:00                         ` Robert Dewar
2000-03-24  0:00         ` tmoran
2000-03-21  0:00 ` David Starner
2000-03-21  0:00   ` Bill Dale
2000-03-22  0:00     ` Robert Dewar
2000-03-22  0:00   ` Robert Dewar
2000-03-22  0:00   ` Robert Dewar
2000-03-22  0:00     ` Paul Graham
2000-03-22  0:00       ` Robert Dewar
2000-03-22  0:00         ` Michael P. Walsh
2000-03-22  0:00           ` Charles Hixson
2000-04-06  0:00             ` Wes Groleau
2000-04-07  0:00               ` Charles Hixson
2000-03-22  0:00         ` Brian Rogoff
2000-03-22  0:00           ` Ted Dennison
2000-03-22  0:00             ` Michael P. Walsh
2000-03-23  0:00           ` Robert Dewar
2000-03-22  0:00         ` Paul Graham
2000-03-23  0:00           ` Robert Dewar
2000-03-23  0:00             ` Ted Dennison
2000-03-23  0:00               ` Robert Dewar
2000-03-23  0:00               ` Paul Graham
2000-03-23  0:00                 ` Robert Dewar
2000-03-23  0:00               ` Larry Kilgallen
2000-03-22  0:00     ` Robert A Duff
2000-03-22  0:00     ` Roger Barnett
2000-03-22  0:00       ` Charles Hixson
2000-03-22  0:00 ` Richard D Riehle
2000-03-23  0:00   ` Jeff Carter
2000-03-23  0:00     ` Michael P. Walsh
2000-03-23  0:00       ` Brian Rogoff
2000-03-23  0:00     ` Robert Dewar
2000-03-22  0:00 ` Marin D. Condic
2000-03-22  0:00   ` Robert Dewar
2000-03-22  0:00   ` Robert Dewar
2000-03-22  0:00   ` Robert Dewar
2000-03-22  0:00     ` Jon S Anthony
2000-03-22  0:00       ` Roger Barnett
2000-03-23  0:00         ` Robert Dewar
2000-03-23  0:00           ` Roger Barnett
2000-03-24  0:00             ` Robert Dewar
2000-03-23  0:00       ` Robert Dewar
2000-03-22  0:00         ` Jon S Anthony
2000-03-23  0:00   ` Chris Morgan
2000-03-22  0:00 ` Pascal Obry
     [not found] ` <01bf9436$9c054880$2c5101be@bthomas4663>
2000-03-23  0:00   ` Robert Dewar
2000-03-23  0:00   ` Ken Garlington
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox