This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: std::pow implementation
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- Cc: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>, <Richard dot Earnshaw at arm dot com>, Alexandre Oliva <aoliva at redhat dot com>, <gcc at gcc dot gnu dot org>
- Date: 30 Jul 2003 14:08:15 +0200
- Subject: Re: std::pow implementation
- Organization: Integrable Solutions
- References: <Pine.LNX.4.44.0307301352570.561-100000@goofy>
Richard Guenther <rguenth@tat.physik.uni-tuebingen.de> writes:
| On 30 Jul 2003, Gabriel Dos Reis wrote:
|
| > Steven Bosscher <s.bosscher@student.tudelft.nl> writes:
| >
| > | Op wo 30-07-2003, om 13:30 schreef Gabriel Dos Reis:
| > | > Do trust the programmer.
| > |
| > | Post a patch and show that it improves most real world code.
| >
| > It suffices to point out that (defunct) KCC did outperform GCC on most
| > real world code.
|
| But surely not due to honouring the inline keyword.
Its honouring the inline keyword was most certainly part of that.
I do distinctly remember having made measurements and having friends
report similar observations no many real world codes. There are still
websites around showing the differences.
| Take a look at
| modestly large C++ code bases and figure out that neither implicit inline
| declarations are used in a sensible way, nor are explicit ones.
I do find that most of the uses of inline sensible in most code bases.
And the notion of "implicit inline declaration" is an invention of some
implementors to excuse their ill-founded transmuting the meaning of
"inline".
[...]
| Of course being able to hint the compiler some more can be useful to
| overcome weakness in the compilers inlining decision implementation as
| that never will be perfect.
It takes first abandoning the idea that the compiler always knows
better than the programmer and the programmer's use of "inline" is
most of the time nonsensical. The programmer does provide hint. The
compiler choses not to listen.
-- Gaby