🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c.moderated
Article #2280

Re: use of the break statement

#2280
From: Andrew Dalgleish
Date: Thu, 14 Mar 1996 13:39
28 lines
1703 bytes
Andrew Dalgleish wrote:
> Optimizers aren't all they're cracked up to be.
> An article in a recent magazine (I don't have it at hand - I'll=20
> see if I can find it) compare the optimization of several commercial
> compilers. Most compilers did very poorly. I don't think any of them=20
> could optimize a loop built entirely with if's and goto's, yet all=20
> the common loop constructs can be simulated this way.

I have found the magazine. In the December 1995 issue of C/C++ Users 
Journal is an article entitled "Another Slap at Lowly goto".
The authors compared the assembler output of 9 compilers, only Microsoft 
C 7.0 optimizes loops built from goto's. All the compilers did worse 
than I would have expected.

The authors came to the wrong conclusion - don't criticize the compiler, 
stay away from goto's. IMO this amounts to shooting the messenger.

-- 
Andrew Dalgleish
Senior Software Engineer
Axon Research, Pty Ltd
6 Wallace Ave
Toorak, VIC
3142
AUSTRALIA
Tel:	+61-3-9826-5538
Fax:	+61-3-9824-0083
Email:	andrewd@axonet.com.au
Technical Details
Message-ID: <4i97ht$8gb@solutions.solon.com>
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
References: <4gfcl7$2ls@solutions.solon.com> <4gnbcp$biq@solutions.solon.com> <4h81gh$aql@solutions.solon.com> <4h9ml2$gub@solutions.solon.com> <4hqedf$1m0@solutions.solon.com> <4i2k0n$8jd@solutions.solon.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
From: Andrew Dalgleish <andrewd@axonet.com.au>
Newsgroups: comp.lang.c.moderated
Subject: Re: use of the break statement
Date: 14 Mar 1996 07:39:09 -0600
Organization: Axon Research, Pty Ltd
Sender: clc@solutions.solon.com
Approved: clc@solutions.solon.com
Message-ID: <4i97ht$8gb@solutions.solon.com>
References: <4gfcl7$2ls@solutions.solon.com> <4gnbcp$biq@solutions.solon.com>
   <4h81gh$aql@solutions.solon.com> <4h9ml2$gub@solutions.solon.com> <4hqedf$1m0@solutions.solon.com> <4i2k0n$8jd@solutions.solon.com>
NNTP-Posting-Host: solutions.solon.com
X-Mailer: Mozilla 2.0 (Win95; I)