This is the mail archive of the gcc-help@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]
Other format: [Raw text]

compile speed of gcc 2.95 vs 3.2


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


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