std::pow implementation

Joe Buck jbuck@synopsys.com
Wed Jul 30 17:32:00 GMT 2003


On Wed, Jul 30, 2003 at 11:37:03AM +0100, Richard Earnshaw wrote:
> This is talking specifically about *very small* functions ("one or two 
> assignments").  It says nothing about what happens if the programmer 
> decides to put a 2000 line monstrosity in the middle of a class definition 
> (which would be legal, if somewhat stupid).

The answer is to do what the programmer says, if possible.  It may well
turn out that the programmer is not as stupid as you think, because
constant propagation winds up throwing away 1980 of those lines and the
call is in an inner loop.  And if the programmer really is stupid, he or
she will learn something.



More information about the Gcc mailing list