home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.modula3
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!src.dec.com!src.dec.com!mjordan
- From: mjordan@src.dec.com (Mick Jordan)
- Subject: Re: Why are M3 executables so big?
- Message-ID: <1993Jan27.030707.9532@src.dec.com>
- Sender: news@src.dec.com (News)
- Organization: DEC Systems Research Center
- References: <C1Hp3L.3z7@babbage.ece.uc.edu>
- Distribution: usa
- Date: Wed, 27 Jan 93 03:07:07 GMT
- Lines: 30
-
- In article <C1Hp3L.3z7@babbage.ece.uc.edu>, dsims@don.ece.uc.edu (David Sims) writes:
- |> Why does the following hello-world program create a 400K stripped
- |> executable on my Sparc box? The .mo file is a mere 399 bytes, but the
- |> executable balloons to 400K. Are the Wr, Stdio, and other run-time
- |> libraries really that large?
- |>
-
- This is an old chestnut that many new users find astonishing, but we ought to
- put it in a little perspective. First, all programs include a relatively
- sophisticated storage manager and garbage collector, a lightweight process
- package (Thread), and a run-time type system. These artefacts, that in other
- languages would count as user libraries, cost quite a bit in code and data
- size. There is also some overhead that arises from generating C code instead
- of native machine code.
-
- In addition, there is substantially more functionality in the libraries,
- than hello-world actually needs. We have not tried very hard to structure
- the library into small components. I have a prototype tool that optimises
- whole M3 programs and, when applied to hello-world, generates an
- executable that is 220K in size, as opposed to 417K, on a DECstation 5000.
- If this is then optimised with the C compiler, it reduces to 177K.
-
- Of course, since you are running on a Sparc, you can use shared libraries
- to mitigate the size of executables.
-
- Mick Jordan
-
-
-
-
-