This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: std::pow implementation
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- Cc: Andrew Pinski <pinskia at physics dot uc dot edu>, 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 08:49:19 -0400
- Subject: Re: std::pow implementation
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.
Thanks,
Andrew Pinski