This is the mail archive of the gcc@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]

Re: Optimizing g++ 3.2


> How can I build an optimized g++ compiler, preferrably using profiling
> feedback from heavily templated code? What are suggested options for
> compiling gcc, if optimizing for speed? Will -fprefetch-loop-arrays help
> (Athlon TB)? What are experiences?

I haven't seen much on this.  I should warn, though, that if you do *any*
experiments of this kind there is a risk that the compiler you produce
will not be reliable (general rule of programming: if it has never been
tested, it probably does not work).  So, before you use your profiled
compiler built with a long list of specialized options, be sure that you
run the regression suite first and get the same results as you get with
a normal "make bootstrap-lean".  Otherwise you might just produce garbage
very quickly.

> What are suggested g++ options to speed up compilations of heavily
> templated code during development?

I'll let others give suggestions, but ...

Even on a single-processor machine, "make -j2" will give substantial
speedup, since one process can have the CPU while the other is doing disk
I/O, and C++ tends to need lots of disk I/O because of the large headers.
This assumes that you have enough RAM, of course.


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