std::pow implementation
Andrew Pinski
pinskia@physics.uc.edu
Tue Jul 29 13:00:00 GMT 2003
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
More information about the Gcc
mailing list