Potential Speedup - gcc-3.2.x compiling large c++ projects

Greg Schafer gschafer at zip.com.au
Sat Feb 15 19:38:13 PST 2003


Hi

Apologies for being slightly off-topic, but I believe this is worth
mentioning to the general testing public.

Did you know that RH have their own gcc-3.2 branch in the gcc CVS? Well, it
pays to keep an eye on those sneaky devils :-)

This patch caught my eye:-

http://gcc.gnu.org/ml/gcc-cvs/2003-02/msg00155.html

It seems to have stemmed from a discussion on the gcc list where it has come
to light that a certain constant default relating to memory management is
way too low for modern hardware.

The start of the (long) thread is here:-

http://gcc.gnu.org/ml/gcc/2003-01/msg01336.html

Note that the thread is talking about gcc-3.3. 3.3 actually has command line
switches to tweak the parameters under discussion while 3.2 does not. Also,
this part of the system (garbage collection) was considerably re-written in
gcc-3.3 so the gains in 3.2.2 might not be as significant.

Intrigued by the patch on the RH branch, I tried an experiment here by
compiling up a stock 3.2.1 but with the RH patch applied. Compiling c++
projects was definitely faster, but only by a few seconds on the smallish
projects I tried it on.

Someone with more patience than me, and at least 256 megs of ram, may want
to give it a whirl for some larger projects (QT, KDE, MOZ, oOO or whatever)
and see if it makes a worthwhile difference to the overall compile time.

e.g. install the tweaked gcc with "--prefix=/opt/gcc-test".

Then compile the projects with:-

"CC=/opt/gcc-test/bin/gcc CXX=/opt/gcc-test/bin/g++ ./configure blah blah"

Greg
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message



More information about the lfs-dev mailing list