gfortran speed benchmarks

Paul Thomas paulthomas2@wanadoo.fr
Sat Nov 5 21:49:00 GMT 2005


Tim,

> With ifort, one more option would normally be used, to select 
> architecture target family and enable vectorization (e.g. -xB or -xW). 
> ifort doesn't set those parameters according to the machine on which 
> you compile, nor do gnu compilers, while many others do so.  If it 
> were not for the long tradition of seldom allowing gnu Fortran 
> different defaults from gcc, it might make sense to make 
> -funroll-loops a default for Fortran; it's far from secret or obscure.

I agree with all of that.  The posted Polyhedron tests for various 
compilers come the disclaimer that the options are not necessarily the 
best for a given test but give a good overall performance.

> What's difficult is to pick a set of options which is most consistent 
> on a given test suite, for a given CPU model, between two quite 
> different compilers.  You may well balk at attempting to figure that 
> out, rather than using a typical set of optimizations applicable to 
> your CPU.  It's hardly a secret that setting -march is useful when you 
> aren't looking for compatibility with 10 year old CPUs, or that 
> avoiding usage of heap  may help on benchmarks.

 From my recent experience on various platforms, -O3 nearly does the 
whole business on all.  The stack variable size has to be increased to 
persuade some of the tests to run at all under Cygwin.  Given that 
0.5-1Gbyte of RAM is becoming standard on most workstations, perhaps we 
should increase the default?

As for secrecy; the manual pages of gfortran and gcc describe all in 
considerable detail.... The Intel compiler comes with plenty of html 
pages that describe in ample detail which option does what.  The DEC 
compiler, which I have used for comparisons under Windows, is also 
similarly supplied with information in the standard installation.  All 
three compilers have plenty of Googlable information posted out there.

Paul T



More information about the Fortran mailing list