std::pow implementation

Robert Dewar dewar@gnat.com
Mon Aug 4 17:33:00 GMT 2003


> Sigh.  In C++, the programmer has already done the needed analysis, and
> has attached the keyword "inline" or defined the function in the class
> body.  Certainly, with -O3 the kind of analysis you describe would be
> appropriate, though possibly expensive.


This claim is made repeatedly, but without any evidence. I think a lot of
C++ programmers decide whether to put thins in the class body on the basis
of other considerations than whether to inline -- a consideration that is
pretty hard to do for the great majority of C++ (or Ada for that matter)
programmers who have not the slightest awareness of machine language or
its implications.

I do agree that if the programmer has attached the keyword "inline" then
that shows at least some thought, though whether it is well informed or
not can often be an issue.



More information about the Gcc mailing list