This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: std::pow implementation


Rob Taylor wrote:
2)  every function has to be maybe-inlinable for good optimisation, but the
inline keyword gives good hinting and should be used.

That's close to my position on the matter.


1) The compiler should be able to determine which functions it can effectively inline for a given circumstance.

2) The compiler should respect "inline" directives from the programmer, generating inline code when it is specified, unless doing so is technically impossible or blatantly inefficient.

3) If the compiler rejects an "inline" request, it should clearly state why it did so. After all, if the compiler is smart enough to second-guess me, it should also be able to explain itself. ;)

Such an approach gives the compiler maximum flexibility while respecting the choices of the programmer.

--
Scott Robert Ladd
Coyote Gulch Productions (http://www.coyotegulch.com)
Software Invention for High-Performance Computing


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]