C++ compile and execution times

Wolfgang Bangerth bangerth@ticam.utexas.edu
Thu Nov 21 11:54:00 GMT 2002


Hi there,
this is basically a nasty mail. The background is that we were asked to 
submit our project, deal.II (see www.dealii.org), for the SPEC 2004 suite, 
so I did a couple of measurements. Long results for my measurements are 
below, but here is a summary:
- recent versions of gcc take more than twice as long to compile the 
  library than, for example, gcc2.95 or icc;
- yet, the run time (with various optimizations turned on) of the 
  example programs of deal.II is approximately 10% longer.

To be honest, I personally don't care so much about the 10% longer running 
time. They are easily accounted for by increase of computing power with 
newer machinces. But the compile time is annoying for developers like me, 
and it bothers me that, for example, switching on -fnew-ra is adding 
another 15% to the already large compile time, and 3.3 is already 25% 
slower than 3.2.

I don't expect these measurements to have any immediate consequences, but 
maybe someone keeps this in mind when new things are added to gcc. Compile 
time _is_ important to some people at least.

This being said, I like gcc, so please understand this as a well-meant nag 
message, rather than fundamental critique. Go on with your good work
  Wolfgang


              compile     execution
                time       time [1]
------------------------------------
2.95           40 min     ___9:43__
3.0.4          66 min       10:50

3.2            64 min       10:45
3.2.1pre       64 min       10:45

3.3            79 min     __10:32__ [2]       (CVS 2002-11-18)
3.3+new-ra     91 min        ***    [2,3]     (CVS 2002-10-30)

3.4-bib        81 min       10:25   [2]

icc6           34 min        ***    [4]
pgcc4         108 min        ***    [5]


[1] The accuracy of the underlined numbers, i.e. for gcc2.95 and
    3.3CVS, is +- 2 seconds, of the other ones +- 5 second.
[2] With --disable-checking.
[3] I get ICEs on 3 files of the library, so the compile time might
    even be slightly higher. I compiled these files without -fnew-ra
    but several of the testcases coredump, so no run-time data is
    available.
[4] When compiled with icc6 and optimization, all my programs abort
    even before main. I don't know the reason (and also don't care too
    much; it's probably an installation problem). So no run-time data
    is available.
[5] Portland Group's compiler is mainly so slow because its prelinker
    does all the instantiations of templates, i.e. the compiler has to
    look at each file twice. Now, we already compile each file up to
    6 times (:-), with different flags and instantiating different
    templates. Multiplying this by another factor of 2 takes even
    longer. (And yes, the sad thing is that it still gets everything
    wrong: explicit specializations are only instantiated by the
    prelinker, and are given internal linkage. Which of course defeats
    some of their purpose if not placed into header files, and leads
    to link errors. So here as well no runtime statistics.)

-------------------------------------------------------------------------
Wolfgang Bangerth              email:           bangerth@ticam.utexas.edu
                               www: http://www.ticam.utexas.edu/~bangerth




More information about the Gcc mailing list