This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: std::pow implementation
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. 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.
Therefore claiming that the context of use shouldn't play any role in
deciding whether a function should be inlined is absurd.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer