On Sun, 9 Feb 2003, Uffe Jakobsen wrote: >Hi Andy, >I my experience C++ templates result in code bloat (I know its a buzzword >:-) and depending on how good the compiler handles templates (and especially >meta templates) also the compile time is hugely affected... >I've seen the gcc compiler use more that 20 minutes on a single rather small >.cc file (gcc 2.95.1 on a Sun@400MHz) because of the reasons given above >:-(
I've seen the same thing when header files contain complex template code. Complex as in two levels of template recursion. I hope this is something the gcc team will address, because the build memory usage and compile time are quite annoying.. >Another more simple explanation: could it be that your code is not stripped >for debug or not optimized ??? (I haven't checked). I haven't stripped the files myself before, as this was handled by RPM in earlier versions. I see that recent versions don't strip them, but.. The bundled bincimapd binary in 1.0.22-1 (7.2 dynamic) is 1706769 bytes, compiled with gcc 2.96. strip'ing this file gives us 1547704 bytes, so 159065 bytes (or approx 9.5%) of the code was removed. The 8.0 dynamic is compiled with gcc 3.2 20020903 and ends up with 893708 bytes. strip'ing this binary gives 791132 bytes (11.5% decrease). Both with -O2 and no other options enabled. :/ Andy -- Andreas Aardal Hanssen | http://www.andreas.hanssen.name/gpg Author of Binc IMAP | Nil desperandum

