This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: std::pow implementation
- From: dewar at gnat dot com (Robert Dewar)
- To: Richard dot Earnshaw at arm dot com, gdr at integrable-solutions dot net
- Cc: aoliva at redhat dot com, gcc at gcc dot gnu dot org, kgardas at objectsecurity dot com,rguenth at tat dot physik dot uni-tuebingen dot de
- Date: Wed, 30 Jul 2003 09:56:39 -0400 (EDT)
- Subject: Re: std::pow implementation
> He can profile.
Profiling is of limited use here. It may find hotspots, but the issue of
how to treat large numbers of small functions that should be inlined cannot
be addressed by profiling, since you may have situations where you have many
such functions and no one function shows up as a hot spot. For an example
look at the set of pragma Inlines for the Ada units sinfo.ads and einfo.ads.
Basically in Ada, we regard pragma Inline as meaning: this function is pretty
small and I call it quite often and I would like the calls to be efficient.
Feel free to optimize in a way that improves time performance even if more
space is generated. I am guessing that it would make sense to inline calls
(I know the standard doesn't formally define this, but you know what I mean).
What we do in practice is to mark the function as inlinable, and use a higher
than usual threshhold for deciding to inline it, which seems to work pretty
well.