Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!strath-cs!cs.glasgow.ac.uk!bru-cc!eesrajm From: eesrajm@cc.brunel.ac.uk (Andrew J Michael) Newsgroups: comp.os.minix Subject: Re: Compiler comparisons (object code) Summary: What are we comparing Message-ID: <1921@Terra.cc.brunel.ac.uk> Date: 6 Jan 91 19:44:40 GMT References: <1640@sun13.scri.fsu.edu> <722@philica.ica.philips.nl> Organization: Brunel University, Uxbridge, UK Lines: 53 In article <722@philica.ica.philips.nl>, adrie@philica.ica.philips.nl (Adrie Koolen) writes: > In article <1640@sun13.scri.fsu.edu> nall@sun8.scri.fsu.edu (John Nall) writes: > >Running both standard Minix 1.5.10 and Minix-386 (on different partitions), > >and having recently installed GCC (with many thanks to Alan Black and friends), > >and having also done some testing with the new ANSI compiler, I had the unique > >opportunity to compare the four compilers on my system. I found the following > >comparisons rather interesting, and thought I would share them.... > > > >John Nall > >nall@sun8.scri.fsu.edu ( Figures deleted ) > > I can't believe, that the GCC 386 back-end is that inefficient! Compile the > programs to assembly with the compilers and then compare the size. I like > to know where the big sizes come from. > > Adrie Koolen (adrie@ica.philips.nl) > Philips Innovation Centre Aachen What exactly are we comparing here ? What are the stack sizes for the examples quoted ? I have taken a couple of examples from my 386 - text data bss stack memory 21504 2048 11224 8192 42968 /usr/bin.old/dhrystone 15360 1024 12284 8192 36860 /usr/bin/dhrystone 26624 2048 2708 8192 39572 /usr/bin.old/sort 19456 1024 4884 8192 33556 /usr/bin/sort In these cases the binaries in /usr/bin.old are compiled with bcc, and the ones in /usr/bin with gcc. In virtually all the cases I looked at quickly recently the gcc compiled binary was smaller than the bcc version, so I don't see a problem ! One should also be careful when comparing the sizes of text produced by gcc since gcc regards strings as constants. If you want to compare the sizes accurately, make sure you use -fwritable-strings when compiling with gcc. Regards - Andy Michael -- Andy Michael (eesrajm@cc.brunel.ac.uk) " Emulation is the sincerest 85 Hawthorne Crescent form of pottery." West Drayton Middlesex - William Frend De Morgan UB7 9PA