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


On Jul 30, 2003, Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:

> But the fact is that the compiler is not doing better by going its own
> programmed logic.  We've not reached the same level of sophistication
> as for register allocation.

And your solution for the problem is to dumb it down further such that
it doesn't even attempt to do a good job?  Heck, it seems obvious to
me that the right solution is to improve the logic, not take it out
and assume the programmer knows better.  The developer of the function
that is a candidate for inlining can seldom foretell whether it's
going to be profitable to inline or not in each and every potential
uses of the function.  The cases in which the developer does have such
complete information are rare, and we should optimize for the common
case.

-- 
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


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