From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!seas.gwu.edu!mfeldman From: mfeldman@seas.gwu.edu (Michael Feldman) Newsgroups: comp.lang.ada Subject: executable sizes for 4 Ada and 2 C compilers Message-ID: <1931@sparko.gwu.edu> Date: 4 Jun 90 22:55:10 GMT Reply-To: mfeldman@seas.gwu.edu (Michael Feldman) Organization: The George Washington University, Washington D.C. List-Id: Here are four programs: with Text_IO; procedure Hello is begin Text_IO.Put_Line("Hello,world"); end Hello; #include main() { printf("hello, world\n"); } procedure Simple is begin null; end Simple; main() { } Here are the executable sizes: Hello, world Null Program C (HP835) 34816 16384 Ada (HP835) 86016 34816 C (Sun-3) 32768 24576 Ada1 (Sun-3) 57344 24576 Ada2 (Sun-3) 106496 32768 Ada3 (Sun-3) 139264 57344 Clearly, linking in the IO libraries makes a BIG difference. In fact, you can try other programs and will discover that linking in the IO libraries creates a BIG constant factor in the size of the executable. This suggests that compiler writers would do well to optimize their IO system, if they can, at least to throw out all unused code. Note that this is NOT an Ada language issue, merely a market issue. --------------------------------------------------------------------------- Prof. Michael Feldman Department of Electrical Engineering and Computer Science The George Washington University Washington, DC 20052 +1-202-994-5253 mfeldman@seas.gwu.edu ---------------------------------------------------------------------------