This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: std::pow implementation
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: Robert Dewar <dewar at gnat dot com>
- Cc: aoliva at redhat dot com, <gdr at integrable-solutions dot net>, <gcc at gcc dot gnu dot org>, <s dot bosscher at student dot tudelft dot nl>
- Date: Wed, 30 Jul 2003 15:52:32 +0200 (CEST)
- Subject: Re: std::pow implementation
On Wed, 30 Jul 2003, Robert Dewar wrote:
> > Defining a function inline is not a careless action. If inlining
> > isn't profitable, the programmer will profile et remove the inline
> > definition. You don't know better than the programmer.
>
> This is often incorrect, because often code is written to be portable, and
> the decision on what is profitable to inline is target dependent. Furthermore
> deciding whether something is profitable to inline on a given target requires
> detailed knowledge of the target architecture, knowledge that very few
> programmers have these days.
Also portability is not only about different targets, but also about
different compilers! Declaring something inline for one compiler doesnt
necessary have the same desired semantics for inline for another one.
Richard.