I wrote a Fortran to C++ conversion program that I used to convert selected
LAPACK sources. Comparing runtimes with different compilers I get:
absolute relative
ifort 11.1.072 1.790s 1.00
gfortran 4.4.4 2.470s 1.38
g++ 4.4.4 2.922s 1.63
This is under Fedora 13, 64-bit, 12-core Opteron 2.2GHz
All files needed to easily reproduce the results are here:
http://cci.lbl.gov/lapack_fem/
See the README file or the example commands below.
Questions:
- Is there a way to make the g++ version as fast as ifort?
- Is there anything I could do in the C++ code generation or in the
"fem" Fortran EMulation library to help runtime performance
(without making the generated C++ code less readable)?
- Is there an interest in similar speed comparisons for other
LAPACK functions (times above are for DSYEV with matrix size 800x800)?
Note: yesterday I sent similar questions to a clang++ list, with the
same subject line. This lead to a llvm bug report that may contain
useful information:
http://llvm.org/bugs/show_bug.cgi?id=7868
Ralf
wget http://cci.lbl.gov/lapack_fem/lapack_fem_001.tgz
tar zxf lapack_fem_001.tgz
cd lapack_fem_001
g++ -o dsyev_test_g++ -I. -O3 -ffast-math dsyev_test.cpp
time dsyev_test_g++