From: mcsun!sun4nl!cwi.nl!dik@uunet.uu.net (Dik T. Winter)
Subject: Re: and then
Date: 10 Apr 93 15:36:50 GMT [thread overview]
Message-ID: <9550@charon.cwi.nl> (raw)
In article <1q3vtq$2lt@travis.csd.harris.com> danr@ada1.ssd.csd.harris.com (Dan
Rittersdorf) writes:
> In article <1993Apr7.162133.3564@nosc.mil> sampson@nosc.mil (Charles H. Samp
son) writes:
...
> > In addition, there
> >are cases when it is unreasonable to expect such an optimization; when the
> >second operand contains a function reference, for example.
There are other possibilities. Short-circuiting may make the program
actually slower (jumps take time and sometimes a lot).
> >
> I find it odd, though, that you feel a vendor has some *responsibility
*
> to provide this optimization.
There is of course no such *responsibility*, it is merely a question of
quality. Especially as I prefer conditional tests in non-short-circuited
form if it does not matter. In that case a good compiler would find what
is most efficient, short-circuiting or not. Short-circuiting should only
be used where it matters for the logic of the program (e.g. the second
operand becomes invalid).
--
dik t. winter, cwi, kruislaan 413, 1098 sj amsterdam, nederland
home: bovenover 215, 1025 jn amsterdam, nederland; e-mail: dik@cwi.nl
next reply other threads:[~1993-04-10 15:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
1993-04-10 15:36 Dik T. Winter [this message]
-- strict thread matches above, loose matches on Subject: below --
1993-04-12 18:38 and then Charles H. Sampson
1993-04-12 13:29 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!noc.n
1993-04-11 3:55 Michael Feldman
1993-04-10 19:52 Alex Blakemore
1993-04-10 15:43 Dik T. Winter
1993-04-10 9:39 munnari.oz.au!yoyo.aarnet.edu.au!news.adelaide.edu.au!usenet
1993-04-10 1:03 Charles H. Sampson
1993-04-09 18:08 Dave Bashford
1993-04-09 14:06 Dan Rittersdorf
1993-04-08 22:35 Andrew Dunstan,,2285592,
1993-04-08 22:28 Alex Blakemore
1993-04-08 19:03 Art Duncan
1993-04-08 16:18 Charles H. Sampson
1993-04-08 15:34 Christopher J. Henrich
1993-04-08 12:21 enterpoop.mit.edu!usc!cs.utexas.edu!mars.tsd.arlut.utexas.edu!gardner
1993-04-07 22:58 Mark Lundquist
1993-04-07 21:07 Ray Harwood -- Data Basix: (602)721-1988
1993-04-07 16:21 Charles H. Sampson
1993-04-07 12:42 Robert Firth
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox