Need to optimize 8086 C code for size

Bob Babcock PEPRBV%CFAAMP.BITNET at husc6.harvard.EDU
Sun Feb 14 19:54:34 AEST 1988


nevin1 at ihlpf.ATT.COM asks (about 8086 compilers):
>What is the best C compiler on the market today for optimizing size?  Any
>comparisons between compilers would be greatly apprieciated.

I am currently comparing  Computer Innovations  C86 version 2.3J,
Turbo-C version 1.5, and MSC 5.0 for a database application which
keeps everything in core.  Code size is critical because code and
data compete for the same memory.  Turbo-C  seems to be the clear
winner in size of the EXE file (about 10% smaller).  But, Turbo-C
seems  to use a memory  allocation  scheme  which takes  25% more
space for the size items  I allocate  than does CI86,  which more
than wipes out the initial memory savings.   I'm not sure how MSC
compares  in this regard because it seems to only have a function
which reports  the space remaining  in the default  data segment,
ignoring the far heap space.  These results are only preliminary,
as I have only had Turbo-C  and MSC for a few weeks.   (CI86  has
been replaced by C86PLUS, and may not be available  any more.  As
of  the  middle  of  last  year,  C86PLUS  was  not  a functional
compiler,  but that has probably  changed  by now, and they  were
claiming great things about it.)

Anyway, code size is not the only consideration if the program in
question allocates a lot of memory.



More information about the Comp.lang.c mailing list