10 JulOptimize compilations on 64-bit AMD and Intel CPUs

The best I’ve found so far for generic use, is this:

-O3 -march=opteron -mtune=amdfam10 -m64 -mfpmath=sse -mcrc32 -ffast-math -fomit-frame-pointer

If you are using a latest-generation AMD64 CPU, made by AMD, the following is recommended:

-O3 -march=amdfam10 -m64 -mfpmath=sse -mcrc32 -ffast-math -fomit-frame-pointer

For many applications, especially graphics and math-oriented, the -ffast-math item will need to be removed.  -O3 may have to be replaced with -O2 for some code, too.

No comments

Place your comment

Please fill your data and comment below.
Name
Email
Website
Your comment