http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51364

--- Comment #10 from Domingo Alvarez <mingodad at gmail dot com> 2011-12-19 
02:25:16 UTC ---
Created attachment 26131
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26131
Program to show that gcc doesn't generate good code size

Here is a program and a batch file that call gcc to generate executables with
different features to show that gcc doesn't generate good code size when it
probably can with _Decimal*.

There is two source files main.c and printf.c the smallest executable is
generated with main.c alone, the biggest executable is generated with main.c
and printf.c using _Decimal128 mixed with _Decimal128 and using isnan.

gcc -O2 main.c -o smallest.exe -> 175KB
gcc -O2 -DWITH_DEC128 -DWITH_ISNAN -DWITH_MPRINTF main.c printf.c -o
biggest.exe -> 2.606KB
gcc -O2 -DWITH_MPRINTF main.c printf.c -o optimus.exe -> 279KB
gcc -O2 -DWITH_DEC128 -DWITH_MPRINTF main.c printf.c -o good.exe -> 503KB

They make several mixes to show how gcc is generating code sizes to basically
the same use of features.

My hope is that this will help analyze and find why this happen.
The answers to this till now don't seem to be valid/consistent.

Reply via email to