From: | Jeff Jackson <jeff@jeff-jackson.com> |
Newsgroups: | comp.compilers |
Date: | 3 Aug 1998 17:58:59 -0400 |
Organization: | --- |
References: | 98-08-011 |
Keywords: | C, C++, performance |
> To summarize:
> C++ compilers will produce code with lower performance than
> C compilers on equivalent code, ...
> Do you agree?
No.
> Can you provide concrete examples?
Yes.
Our (Concurrent Computer Corporation's) C++ compiler uses the same
back end code generator as our C (and FORTRAN and ADA) compiler. Thus
C++ got the benefit of all the performance tuning and optimization
algorithms that went into C. Further, in order to have a decent
chance of generating good code for the features unique to C++, we had
to invest considerable resources into doing even more analysis for
optimization in the C++ compiler. As a result, the C++ compiler
generating code for C source, generates better code than the older C
compiler (which hasn't yet incorporated the newer analysis).
I expect the same to be true for anyone who shares optimization and
code generation code across multiple compilers (which I suspect is
just about all major vendors these days).
--
http://www.jeff-jackson.com
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.