public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* compile speed of gcc 2.95 vs 3.2
@ 2003-01-27 16:49 Ralph Gauges
  0 siblings, 0 replies; only message in thread
From: Ralph Gauges @ 2003-01-27 16:49 UTC (permalink / raw)
  To: gcc-help

Hello,

I already posted a similar question to the libstdc++ list, but maybe this list is the right on since it seems to boil down to the compiler.

Here is the problem:

I have written a class that uses lots of insert statements of maps and inserts lots of strings (about 4000 all in all). Now I tried to compile it with g++ 3.2. Without optimization it took several minutes, with optimization (O3) it took a long long time (I actually stopped after 4 hours). I also tried to compile it on g++ 2.95 but with optimization it would run out of memory on a 1GB Machine (which is strange but seems to be a different  problem). I now made some changes to get rid of redundant strings and only use pointers to strings in the map. This already seems to have had some effect because now it compiles in a few seconds with g++ 2.95 (-O0) up to several minutes (-O3). But if I try to compile it with g++ 3.2 it takes several minutes (-O0) up to several hours (-O3).
I read some posts in the mailing list that other people have noticed a slow down in compile speed from g++ 2.95 to g++ 3.x and they reported slow downs that are about factor 2 to 10. The slow down I got with g++ 3.2 here seems to be around 40! I also tried the latest cvs sources, but it is just as slow.
Is this a known problem? Is there anything one can do in order to avoid this besides using gcc 2.95? I don't care about twice or even three times the compile time, but I don't want to wait for hours everytime I compile the class.

Thanks a lot

Ralph

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-01-27 16:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-27 16:49 compile speed of gcc 2.95 vs 3.2 Ralph Gauges

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).