🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #13607

Re: Optimization vs. the programmer

#13607
From: dik
Date: Sun, 12 Apr 1987 00:35
15 lines
1140 bytes
In article <3300003@uiucdcsm> grunwald@uiucdcsm.cs.uiuc.edu writes:
 > 
 > Strength reduction is replacement of operations such as "i = j * 8" by
 > "i = j << 3", or "i = j % 8" by "i = j & 0x3" (if j is unsigned).
 > 
 > As for source-to-source translation: not for me.

And that is right, otherwise you might see i * 14 transformed to
(i << 4) - (i << 1), which is slower on some machines.
(The Pascal compiler on one of the systems I use did this, this
'optimization' has been turned off.)
-- 
dik t. winter, cwi, amsterdam, nederland
INTERNET   : dik@cwi.nl
BITNET/EARN: dik@mcvax
Technical Details
Message-ID: <344@zuring.mcvax.cwi.nl>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!husc6!seismo!mcvax!dik
References: <479@danews.ATT.COM> <3300003@uiucdcsm>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!husc6!seismo!mcvax!dik
From: dik@mcvax.UUCP
Newsgroups: comp.arch
Subject: Re: Optimization vs. the programmer
Message-ID: <344@zuring.mcvax.cwi.nl>
Date: Sat, 11-Apr-87 19:35:34 EST
Article-I.D.: zuring.344
Posted: Sat Apr 11 19:35:34 1987
Date-Received: Tue, 14-Apr-87 00:00:40 EST
References: <479@danews.ATT.COM> <3300003@uiucdcsm>
Reply-To: dik@zuring.UUCP (Dik T. Winter)
Organization: CWI, Amsterdam
Lines: 15