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).