------- Additional Comments From steven at gcc dot gnu dot org 2005-01-28 16:23 ------- The -xN you add make ifort specialize the code for Pentium 4. So far, nobody has cared to make GCC produce good code for the good old Pentium 4 so I would not be terribly surprised if we lose a lot just on the normal code generation. Add to that the fact that -xN enables a lot of extra optimizations in ifort that gcc does not have yet (vectorization is one example in your case), it is not a surprise at all that we are that much slower.
I don't know if the mainline vectorizer is already smart enough to handle the loop in your code. Probably it is not. You could try "gfortran -O3 -mtune=pentium4 -ffast-math -mfpmath=sse -ftree-loop-linear -ftree-vectorize yourcode.f90" and see if it helps. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14741