This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Code bloat using g++



Can anyone tell me what areas to look at to reduce code bloat when using
g++?

When I use KCC I get about 1/5th of the size object files that I get with
g++.

When I try the following options I can reduce the g++ code somewhat to about
1/3 to 1/4

-fno-implicit-templates -fno-implicit-inline-templates -fno-rtti

but still nowhere near what KCC is producing.


G++ code 
libcssadi.a[adaptation_item.]: 98464(.text) + 3552(.data) + 248(.bss) +
195888(.debug) = 298152

KCC code
libcssadi.a[adaptation_item.]: 28608(.text) + 2800(.data) + 80(.bss) +
46172(.debug) = 77660


I'm only (re)evaluating KCC at the moment and switching to it would be
problematic for other reasons, however, it would be nice to know why g++ is
producing so much more code.

Any clues, or even better suggestions to reduce the size of the g++ code?

-- 
Kit Smithers


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]