This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Speed comparison with Intel compiler


Ignacio Fernández Galván wrote:

I just tried running a piece of code I'm writing compiled with gfortran
and with ifort, and the difference is worrying.

ifort: 23 s
gfortran: 165 s
gfortran -O3 -ffast-math -funroll-loops -ftree-vectorize
-march=athlon-xp -msse -mfpmath=sse,387: 164 s

The code has nothing really special, it just converts some coordinates
and quaternions into transformed coordinates, and the main part I guess
is generating the rotation matrices and applying them (with MATMUL).
There is also some (maybe too much) disk I/O)

Quaternions, like so:


There are at least two ways of representing quaternions as matrices,
in such a way that quaternion addition and multiplication correspond to matrix addition
and matrix multiplication (i.e., quaternion-matrix homomorphisms).
One is to use 2×2 complex matrices, and the other is to use 4×4 real matrices.


?

I betcha the Intel compiler expands the MATMULs inline and unrolls the loops completely - and gfortran doesn't.

Nice project for someone who knows the scalarizer.

--
Toon Moene - e-mail: toon@moene.indiv.nluug.nl - phone: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
At home: http://moene.indiv.nluug.nl/~toon/
Who's working on GNU Fortran: http://gcc.gnu.org/ml/gcc/2007-01/msg00059.html



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]