[cfe-dev] food for optimizer developers

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Mon Aug 9 18:52:55 PDT 2010


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
clang++ 2.8 (trunk 108205) 6.487s     3.62

This is under Fedora 13, 64-bit, 12-core Opteron 2.2GHz

All files to easily reproduce the results are here:

  http://cci.lbl.gov/lapack_fem/

See the README file or the example commands below.

Questions:

- Why is the code generated by clang++ so much slower than the g++ code?

- Is there anything I could do in the C++ code generation or in the "fem"
  Fortran EMulation library to help runtime performance?

Ralf


wget http://cci.lbl.gov/lapack_fem/lapack_fem_001.tgz
tar zxf lapack_fem_001.tgz
cd lapack_fem_001
clang++ -o dsyev_test_clang++ -I. -O3 -ffast-math dsyev_test.cpp
time dsyev_test_clang++



More information about the cfe-dev mailing list