This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Poor pow() / floating point performance of on x86_64
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Ralf Lübben" <ralfluebben at gmx dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 26 Sep 2007 18:31:21 +0200
- Subject: Re: Poor pow() / floating point performance of on x86_64
- References: <200709261035.20915.ralfluebben@gmx.de> <200709261635.50937.ralfluebben@gmx.de> <200709261823.35945.ralfluebben@gmx.de> <200709261828.33369.ralfluebben@gmx.de>
On 9/26/07, Ralf Lübben <ralfluebben@gmx.de> wrote:
> Hello,
>
> maybe this is the better list to post the problem (see below).
This is off-topic here, gcc-help would be a more appropriate list.
> Regards
> Ralf
>
> On Wednesday, 26. September 2007 18:23:34 Ralf Lübben wrote:
> > Ok,
> >
> > the problems seems to be the pow() function. If I use instead the function
> > gsl_pow_int(double x, int n) from the gsl library the performance on the
> > x86_64 machine is much faster.
> > I call the pow function with the following values:
> >
> > pow(5.0,-3.0);
> > pow(10.0,-3.0);
> > pow(15.0,-3.0);
> > pow(20.0,-3.0);
pow and gsl_pow_int don't compute the same thing. Use -ffast-math and gcc
will do equivalent stuff.
Richard.