This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: std::pow implementation
Alexandre Oliva <aoliva@redhat.com> writes:
| On Jul 29, 2003, Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:
|
| > The point you seem to be missing is that whether a function is inlined
| > depends on the context of use -- not just on its intrinsinc complexity.
| > That is what is absurd. Not the mere statement of that fact.
|
| The context of use can make a *lot* of difference on whether it's
| worth to inline a function or not.
But, why don't you trust the programmer? Why do you insist that you
know better than the programmer?
| Consider a very complex function
| that takes a boolean argument, used to enable or disable most of the
| complexity in the function. If the caller passes a false boolean
| argument, the function would simplify to pretty much nothing.
This is not a convincing example.
| Therefore claiming that the context of use shouldn't play any role in
| deciding whether a function should be inlined is absurd.
No, what is absurb is the imaginary scenario you describ above.
-- Gaby