This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
C++ and Benchamrking gcc compile-time performance
- From: "Scott Robert Ladd" <scott at coyotegulch dot com>
- To: "Mark Mitchell" <mark at codesourcery dot com>, "Gabriel Dos Reis" <gdr at codesourcery dot com>, "Robert Dewar" <dewar at gnat dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Sat, 18 May 2002 13:31:02 -0400
- Subject: C++ and Benchamrking gcc compile-time performance
Let's see if we can move this discussion in a constructive direction,
then...
Mark hits the nail squarely on the head:
> Robert, some of the ways that people are using C++ is putting an
> incredible strain on compilers -- not just GCC -- and *is* making it
> difficult for people to work effectively.
In my experience, the problem stems from people stressing templates into
realms beyond reason (in my humble opinion, that is). An example of this is
the C++ programming model espoused by Andre Alexandrescu in his book "Modern
C++ Design." No knock against Andre -- his designs and uses of templates are
truly remarkble, solving some rather difficult problems. However, his style
of coding -- nested templates in complex inheritance hierarchies -- puts
great strain on compilers.
I tend to be conservative in my C++, to avoid finding compiler bugs (despite
my caution, I blew MSVC++ 13.0 (.Net) into oblivion last night when a rather
simple template crashed the compiler).
I've been doing C++ for a long time, and have some experience with
benchamrks and test code; over the next few weeks, I'll put together a
stress test that tests C++ compilation speed over "modern" code samples,
trying to get us some metrics for judging the performance of g++.
I look forward to intelligent suggestions.
..Scott