std::pow implementation

Richard Guenther rguenth@tat.physik.uni-tuebingen.de
Wed Jul 30 12:42:00 GMT 2003


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. 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. You could
argue this is the users fault, but I'd argue the compiler is (or
should be) better at deciding this based on function size (which may
depend upon parameters passed).

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.

Richard.



More information about the Gcc mailing list