Optimization tradeoffs (time vs. space)

roy@phri.uucp (Roy Smith)
1 Aug 88 18:01:03 GMT

          From comp.compilers

Related articles
Optimization tradeoffs (time vs. space) roy@phri.uucp (1988-08-01)
Re: Optimization tradeoffs (time vs. space) markhall@pyramid.pyramid.com (1988-08-05)
Re: Optimization tradeoffs (time vs. space) ames!coherent!dplatt@ncar.UCAR.EDU (1988-08-05)
Re: Optimization tradeoffs (time vs. space) tekcrl.tek.com!willc@RELAY.CS.NET (Will Clinger) (1988-08-06)
Re: Optimization tradeoffs (time vs. space) gbs@nsc.nsc.com (1988-08-08)
Optimization tradeoffs (time vs. space) midkiff@uicsrd.csrd.uiuc.edu (1988-08-09)
Re: Optimization tradeoffs (time vs. space) roy@phri.uucp (1988-08-10)
[1 later articles]
| List of all articles for this month |

From: roy@phri.uucp (Roy Smith)
Newsgroups: comp.compilers
Date: 1 Aug 88 18:01:03 GMT
Organization: Public Health Research Institute, NYC, NY

Some compilers have options to select what kind of optimization to
do: space or time. Can somebody give me some idea of how much difference
it makes which you pick? Lots of optimizations (most?) reduce both object
code size and execution time. For example, in the fragment:


X = Y
X = Z


it's obvious that removing the code generated from the first statement will
do both. To my naive mind, it seems that the difference between the two
types of optimization would be rather small.
--
Roy Smith, System Administrator
Public Health Research Institute
{allegra,philabs,cmcl2,rutgers}!phri!roy -or- phri!roy@uunet.uu.net
"The connector is the network"
[In my experience, except in contrived programs the difference is usually
insignificant. The one exception that leaps to mind is situations like a
C switch statement that involves looking something up in a sparse table.
The fastest code would subscript a huge array, while the smallest would
probably do a hear or linear search. The paging overhead associated
with the huge array often negates any speed advantage, but compiler
writers usually figure that's somebody else's problem. -John]
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.