Re: Dead code elimination

henry@zoo.toronto.edu (Henry Spencer)
Tue, 5 Nov 1991 17:31:15 GMT

          From comp.compilers

Related articles
Dead code elimination whatis@ucsd.edu (Steve Boswell) (1991-10-26)
Re: Dead code elimination henry@zoo.toronto.edu (1991-10-29)
Re: Dead code elimination clyde@hitech.com.au (1991-11-01)
Re: Dead code elimination henry@zoo.toronto.edu (1991-11-05)
Re: Dead code elimination schwartz@roke.cs.psu.edu (1991-11-05)
Re: Dead code elimination dd@mips.com (1991-11-05)
Re: Dead code elimination eggert@twinsun.com (1991-11-06)
Re: Dead Code Elimination preston@dawn.cs.rice.edu (1991-11-07)
dead code elimination preston@dawn.cs.rice.edu (1991-11-26)
dead code elimination preston@tera.com (1995-03-23)
| List of all articles for this month |

Newsgroups: comp.compilers
From: henry@zoo.toronto.edu (Henry Spencer)
Keywords: optimize, linker
Organization: U of Toronto Zoology
References: 91-10-106 91-11-007
Date: Tue, 5 Nov 1991 17:31:15 GMT

In article 91-11-007 clyde@hitech.com.au (Clyde Smith-Stubbs) writes:
>I'd still like to know why a simple printf("Hello world\n"); when compiled
>with cc -n on my Sun produces a 94K program! No wonder they had to
>implement dynamic linking! And that 94K includes over 40K code AND over
>40K data! Does anyone have any idea what it is all for?


Some of this is undoubtedly library routines optimized for use in large
programs. For example, unless they've changed this since older SunOSes
(we never have downgraded to 4.n from 3.5), the standard malloc() has
8KB of header structures for efficient handling of vast numbers of
small allocation requests. And of course, even "hello world" ends up
using malloc() via the i/o library.


A cynic would also say that "Sun" stands for "System Underconfigured Now",
and would point out that things like add-on memory are quite profitable
for manufacturers. "If you think you need a prescription, see a doctor,
not a pill salesman."
--
Henry Spencer @ U of Toronto Zoology, henry@zoo.toronto.edu utzoo!henry
[I wouldn't be surprised if the 94K also included large amounts of network
library because something used NIS (yellow pages) and hence the whole
RPC and XDR suite. -John]
--


Post a followup to this message

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