huge c++ binaries compared to gcc

dpeterc
Total Points:
675
Status Points:
175
Brown Belt
September 7, 2008 5:42 PM PDT
Rate
 
#2 Reply to #1
Thanks for the suggestions, Tim.
I have tried to add  -ftree-vectorize to the gcc compilation with -O3, but it did not make and significant change in the code size. It seems that auto vectorization is already enabled with -O3 on gcc.
http://gcc.gnu.org/projects/tree-ssa/vectorization.html

The other tip regarding template inlining was quite frutitful, by setting
-inline-level=0
I could reduce the icc's -O3 binary size down to 2.2 MB, which is easier to swallow.

The C++ binary is still big compared to C. One of my other projects has 100.000 lines of C code, and yet it only makes a 1.4 MB binary, compiled with -O3, both with ICC as with GCC. So C++ base binary of comparable source size and optimization levels will  still be roughly 3 times bigger than C. I wonder if other people have the same experience, or I am doing somethign wrong.

Dušan Peterc
http://www.arahne.si


Intel Software Network Forums Statistics

8473 users have contributed to 31605 threads and 100654 posts to date.
In the past 24 hours, we have 30 new thread(s) 110 new posts(s), and 160 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member Kevin Johnson