This is the mail archive of the 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: reduce compilation times?

"J.C. Pizarro" wrote:

> * to use -O3 -fomit-frame-pointer -funroll-loops -finline-functions -fpeel-loops

This is exactly the opposite of what you should do if you're trying to
reduce compile time.  -O3 includes marginal optimizations that increase
compile time and usually do not have substantial benefit.  -O2 is meant
as a balance between decent optimization and compile speed.  If you want
faster compile speed then you use -O1 or -O0, or (sadly) use an older
version of gcc.  You certainly don't tell the compiler to try wild and
crazy stuff, just like you don't use gzip -9 if compression speed

> * to use SSE2/SSE/AltiVec (SSE3 is little bit slower)
> * to disable shared (it reduces linking time and paging time), to
> enable -static.
> * to recompile the shared libraries (that it depends) to static libraries.
> * to disable threads (they reduce I/O bandwith) if the program
>   doesn't require threading
> * to disable checking (-DNDEBUG)
> * to modify optimizing their sources after profiled the runned
> testsuite (-pg, gprof)

These all have to do with runtime performance, not compile time. 
Please, read the question.


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