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


Op di 29-07-2003, om 14:36 schreef Gabriel Dos Reis:
> Steven Bosscher <s.bosscher@student.tudelft.nl> writes:
> | If you were so great you would have declated __cmath_power inline in
> | the first place. 
> 
> Did I claim I am "great" or "so great"?  

No you did not and I am sorry I formulated things like that.

> There are reasons I didn't declare __cmath_power inline in the first place. 
> That is why I asked for data and ways to reproduce them.

What are those reasons?  Clearly it helps to add the inline keyword. 
Something in the standard???

> | Now cut away all the redundant labels and other cruft, and you end up
> | with:
> 
> In short, you have demonstrated that if "inline" is given its obvious
> meaning, the compiler can do a better job.  That is what I claimed in
> the first place.

No, I've shown that inline still has a meaning in GCC whereas you
claimed that "it was decided that the compiler knows better than the
programmer", i.e. the compiler overrules the user.  What I've shown is
that the compiler can take a hint.

If you look at the tree inliner, it still honours the inline keyword,
and last time I checked, inline functions still were twice as likely to
be inlined as non-inline functions (at -O2 anyway).

Gr.
Steven


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