home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 6289 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: globe.indirect.com!fnf
  2. From: fnf@fishpond.ninemoons.com (Fred Fish)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: GCC C++ questions
  5. Date: 26 Mar 1996 06:52:36 GMT
  6. Organization: Cronus
  7. Message-ID: <4j847r$omc@globe.indirect.com>
  8. References: <314c6829@usura.metropolis.nl> <4il6kv$3tc@news6.erols.com> <4iupvp$131e@baggins.cc.flinders.edu.au>
  9. NNTP-Posting-Host: amigalib.com
  10.  
  11. In article <4iupvp$131e@baggins.cc.flinders.edu.au>,
  12. Daniel J. O'Connor <doconnor@sybil.ist.flinders.edu.au> wrote:
  13.  
  14. >Try Storm C, it compiles the abovve program to, uhh, 2840 bytes :)
  15. >This was with the default settings too =)
  16.  
  17. All this proves is that it's libraries have been organized to minimize
  18. the amount of runtime support code pulled into the executable, or
  19. perhaps it uses a shared library for the C++ runtime.  Gcc compilers
  20. this code to 40 bytes, though the object file wrapper placed around
  21. those 40 bytes is about 1Kb and certainly adding runtime support pulls
  22. in even more stuff:
  23.  
  24.     fishpond [83] g++ -c -O2 j.c
  25.     fishpond [84] size j.o
  26.     text    data    bss     dec     hex     filename
  27.     33      7       0       40      28      j.o
  28.     fishpond [85] ls -l j.o
  29.     -rw-r--r--   1 fnf      cronus        984 Mar 25 23:49 j.o
  30.  
  31. Looking for ways to build a minimum sized executable is interesting
  32. and entertaining, but seldom a useful metric for the usability of a
  33. compiler when applied to real programming projects.
  34.  
  35. -Fred
  36. -- 
  37. CRONUS  --  1840 E. Warner Road #105-265  --  Tempe, AZ 85284  --  USA
  38. Voice:  (800) 804-0833  or  (602) 491-0442        FAX:  (602) 491-0048
  39. Email:  info@ninemoons.com
  40. Ftp site: ftp.ninemoons.com
  41.