std::pow implementation
Gabriel Dos Reis
gdr@integrable-solutions.net
Wed Jul 30 12:46:00 GMT 2003
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
More information about the Gcc
mailing list