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


> I won't insist on the "as-if" rule: the longstanding promise in the GCC
> manual that "an inlined function is as fast as a macro" will do for me
> as a spec.  If you can achieve that without actually doing the inlining,
> go for it.

That's a problematic spec, it is not at all clear that you cam make
this guarantee. In our experience, you often get some junk from the
inlining process in gcc that is eliminated if you do macro expansion.

In fact we recently implemented front end inlining in GNAT (the -gnatN
switch) which gives something closer to C macro behavior, and we often
find that we get better code.


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