Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!utgpu!water!watmath!watcgl!watmum!smvorkoetter
From: smvorkoetter@watmum.UUCP
Newsgroups: comp.lang.c
Subject: Re: Dhrystones
Message-ID: <2617@watcgl.waterloo.edu>
Date: Mon, 7-Dec-87 10:17:18 EST
Article-I.D.: watcgl.2617
Posted: Mon Dec  7 10:17:18 1987
Date-Received: Sat, 12-Dec-87 09:12:35 EST
References: <3368@rosevax.Rosemount.COM> <5096@ccv.bbn.COM> <19425@amdcad.AMD.COM> <9613@mimsy.UUCP> <19440@amdcad.AMD.COM>
Sender: daemon@watcgl.waterloo.edu
Reply-To: smvorkoetter@watmum.waterloo.edu (Stefan M. Vorkoetter)
Organization: U. of Waterloo, Ontario
Lines: 17
Keywords: C, performance, useful

In article <19440@amdcad.AMD.COM> tim@amdcad.UUCP (Tim Olson) writes:
)In article <9613@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes:
)| In article <19425@amdcad.AMD.COM> tim@amdcad.AMD.COM (Tim Olson) writes:
)| >... There exists quite a lot of "dead code" in Dhrystone
)| >(expressions which aren't ever used) which good compilers can optimize
)| >totally away.  This isn't the case with real-world code.
)
)		IntLoc3 = IntLoc2 * IntLoc1;
)		IntLoc2 = IntLoc3 / IntLoc1;
)		IntLoc2 = 7 * (IntLoc3 - IntLoc2) - IntLoc1;
)
)The first assignment into IntLoc2 is replaced in the next expression --
)no need to calculate it (and we take a divide out of the loop -- big win ;-)
)
)	-- Tim Olson
The first IntLoc2 assignment and the division must be done since the result is
used to calculate the value for the second assignment.