A
Arjen Markus
In comp.lang.fortran Arjen Markus said:I used the above program with two different compilers on one Linux
machine and got the following results:
[ifort] total = 24.2 sec
[g95] total =124.9 sec
This comparison does not make sense: Ifort uses by default -O2
optimization and GCC (gfortran, g95, g77) uses -O0.
[ifort -O2 -ipo -static] total = 34.4 sec
(Slower, surprisingly, a second run showed 24.9 total)
[g95 -O3] total = 92.7 sec
For comparison (without thinking too much about the options; on x86-64
Linux):
gfortran [4.3] -march=opteron -ffast-math -funroll-loops -ftree-
vectorize -msse3 -O3 TEST_FPU.f90
total = 19.2 sec
ifort [9.1] -O3 -xW -ipo -static TEST_FPU.f90
total = 17.7 sec
sunf95 [8.3] -w4 -fast -xarch=amd64a -xipo=0 TEST_FPU.f90
total = 15.5 sec
NAG f95 [5.1/gcc 4.1.2] -O4 -ieee=full -Bstatic -march=opteron -ffast-
math -funroll-loops -ftree-vectorize -msse3 TEST_FPU.f90
total = 20.2 sec
g95 [0.91-Feb23/gcc 4.0.3] -march=opteron -ffast-math -funroll-loops -
ftree-vectorize -msse3 -O3 TEST_FPU.f90
total = 31.7 sec
Tobias
Oh, I was not aware of the default settings - that explains why there
was little
effect of the optimisation. I should try again on my Linux machine and
see
what happens with the above.
Regards,
Arjen