On 3/6/2013 11:49 AM, Alexander Monakov wrote:
On Wed, 6 Mar 2013, Michele Martone wrote:
. CFLAGS for gcc:
"-O3 -pipe -march=native -mtune=native -mavx -std=c99 -fno-unroll-loops"
. CFLAGS for icc: "-O3 -xAVX -restrict -unroll=0"
This makes a comparison "unfair" since the two compilers use different
optimization restrictions for floating-point operations by default (GCC is
conservative, and thus more restricted in optimizations). See the
documentation for -ffast-math GCC option, and floating-point flags in the ICC
help (e.g. options -fp-model and -mp).
Alexander
Setting gcc -ffast-math would still make for "unfair" comparison unless
you compared with icc -complex-limited-range, as -ffast-math includes
-fcx-limited-range.
The point is somewhat well taken, as -fp-model source would have to be
added to the icc options for equivalence with the quoted gcc ones.
I don't know that icc understands -unroll=0, it's usually spelled -unroll0.
--
Tim Prince