|
From: Vincent T. <vt...@un...> - 2009-09-18 21:50:04
|
On Fri, 18 Sep 2009, Brecht Sanders wrote: > >>>> I have compiled several C libraries with gcc (stripped) and vc++ (release >>>> mode) and I have noted that the code generated by vc++ is always lower >>>> (for one library, it 90KB with gcc and 70KB with vc++) >>>> >> other ideas ? > > Have you used optimization switches like -O3 or -Os? > This is what the command line help (gcc -v --help) says about them: > -O<number> Set optimization level to <number> > -Os Optimize for space rather than speed > I usually use these to build releases together with -s (strip). > Also I recently switched to MinGW 4.4.0 and the binaries are somewhat smaller > than in version 3. I optimize in speed, so -O3. That's also the purpose of the release mode of visual studio. So i won't use -Os. I use currently gcc 3.4.5. Maybe I'll try indeed gcc 4.4, to see the differences. Maybe there are also some options in the VS project that does not completely optimize, hence produces smaller code. thanks for your answer Vincent Torri |