C compile time

Scott Robert Ladd coyote@coyotegulch.com
Wed Jun 18 14:00:00 GMT 2003


Dara Hazeghi wrote:
 > Okay, here's the updated table. Checking is disabled
 > on all compilers.
 >
 > gcc version     -O0     -O1     -O2     -O3
[snip]

Could you run tests for debug compiles (i.e., -g, -pg)? We could then 
compare numbers directly and fairly against your numbers for optimized 
compiles.

If you haven't the time, I'm running my own benchmarks for a forthcoming 
paper that compares gcc and icc (on many levels). I'll post those 
numbers once I've completed my tests.

I rarely use optimizations until I'm in the final phase of a project. My 
development compiles often include options for debugging or profiling; 
when I compile with optimization, my goal is to generate the fastest 
possible executable image, regardless of compile time (unless it is 
egregious, i.e., on an order of days). In terms of the overall lifetime 
of a program, compile time is less significant than run time.

Another note: Intel's compiler produces code that is faster in both 
compilation and execution (in most cases). I suspect some of gcc's 
compile time can be attributed to its multi-platform approach; Intel, by 
virtue of being platform specific, can focus its algorithms on one target.

Finally, it's important to consider correctness and comprehensiveness; 
if a faster compiler does not support current standards, it is generally 
less valuable to me than a slower compiler with full compliance. This 
observation is, perhaps, less critical for those who work only with C89 
and earlier standards, but is very important to those of us interested 
in C99 and C++. Recent gcc compilers may be slower, but they provide 
support for current standards.

-- 
Scott Robert Ladd
Coyote Gulch Productions (http://www.coyotegulch.com)
Professional programming for science and engineering;
Interesting and unusual bits of very free code.



More information about the Gcc mailing list