Gnu Compiler Peformance on Edison
By default, the Gnu compilers do not provide any optimization.
These are the Gnu optimization options we compared. The quotations are from the gcc compiler on-line man page.
|-O3 -ffast-math||In addition to the -O3 optimizations, this performs optimizations at the expense of an exact implementation of IEEE or ISO rules/specifications for math functions.|
|-O3||This is the highest numerical level of optimization.|
|-O3 -funroll-loops||This unrolls loops whose number of iterations can be determined at compile time or upon entry to the loop. It also turns on complete loop peeling (i.e. complete removal of loops with a small constant number of iterations).|
|-O3 -ffast-math -funroll-loops||See above.|
|-Ofast||"Disregard strict standards compliance. -Ofast enables all -O3 optimizations. It also enables optimizations that are not valid for all standard compliant programs."|
-O3 gives a comparatively good level of optimization. If you can relax IEEE compliance, adding -ffast-math or using -Ofast can improve performance even more.