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: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: Gabriel Dos Reis <gdr at integrable-solutions dot net>, Steven Bosscher <s dot bosscher at student dot tudelft dot nl>, <gcc at gcc dot gnu dot org>
- Date: Tue, 29 Jul 2003 14:57:59 +0200 (CEST)
- Subject: Re: std::pow implementation
On Tue, 29 Jul 2003, Andrew Pinski wrote:
> On Tuesday, Jul 29, 2003, at 08:43 US/Eastern, Richard Guenther wrote:
> > On 29 Jul 2003, Gabriel Dos Reis wrote:
> >
> > To show you some of the performance improve I get with my "hacked"
> > __pow_helper(), the average time for one iteration of my scientific
> > app dropped from 2.6s to 1.8s - this is a 30% improvement. Not to say
> > I ever expected gcc (or libstdc++) to not create x*x out of
> > std::pow(x,2).
>
> If you use ::pow instead, gcc does change it to be x*x on the mainline
> at least.
Why isnt this done for std::pow? Any particular reason?
Richard.
--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/