This is the mail archive of the
egcs@egcs.cygnus.com
mailing list for the EGCS project. See the EGCS
home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]
Re: another silly optimisation case
- To: Joern Rennecke <amylaar@cygnus.co.uk>
- Subject: Re: another silly optimisation case
- From: Matthew Kirkwood <weejock@ferret.lmh.ox.ac.uk>
- Date: Wed, 10 Mar 1999 22:14:20 +0000 (GMT)
- cc: egcs@egcs.cygnus.com
- Delivered-To: listarch-egcs@egcs.cygnus.com
- Delivered-To: mailing list egcs@egcs.cygnus.com
- In-Reply-To: <199903101847.SAA19808@phal.cygnus.co.uk>
- Mailing-List: contact egcs-help@egcs.cygnus.com; run by ezmlm
- Sender: owner-egcs@egcs.cygnus.com
On Wed, 10 Mar 1999, Joern Rennecke wrote:
> > int f(int g) { return g ? 34 : 0; }
> > int g(int f) { return f && 34; }
> >
> > I don't suppose (x ? y : 0) is a hugely common construction
> > but it seems to be another candidate for simple optimisation.
> f (1) returns 34.
> g (1) returns 1.
Oops. Kill me now.
Perhaps I'll sleep a little more next time :)
Matthew.