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: Poor pow() / floating point performance of on x86_64


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.


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