|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2003-01-25 22:52:15
"Jaap Suter" <J.Suter_at_[hidden]> writes:
> Hello,
>
> I was wondering whether anybody has any tips to fight code-bloat on GCC. I'm
> using the MPL in rather 'extravagant' ways, and I have object files from 4
> to 6 mb, and a final executable that is 16 mb. My object files and
> executable using the Intel compiler and MSVC are a lot smaller (ca. 300 kb
> and 905 kb respectively).
>
> I have checked the following:
>
> http://www.diamand.org/bloat.html
> http://www.garloff.de/kurt/freesoft/gcc/
> http://www.boost.org/libs/regex/faq.htm
> http://www.accu.org/acornsig/public/cathlib/docs/bloat.html
>
> but none of them really apply or help. I'm not really sure I understand the
> reasons for the bloat either. Normally template-bloat is caused by having a
> template instantiation appear in more than one translation unit, and them
> not being dropped during the linking fase. However, in my case it is the
> object files themselves that are really big already, whereas they are small
> on Intel and MSVC.
Try turning off debug symbols; GCC spends a long time and a lot of
disk generating them.
HTH,
-- David Abrahams dave_at_[hidden] * http://www.boost-consulting.com Boost support, enhancements, training, and commercial distribution
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk