lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] use boost::math:expm1() and log1p()


From: Vaclav Slavik
Subject: Re: [lmi] use boost::math:expm1() and log1p()
Date: Sun, 05 Apr 2009 23:48:07 +0200

On Sun, 2009-04-05 at 21:04 +0000, Greg Chicares wrote:
> > Before:
> > 
> >    Speed test: pow
> >      1.763e-06 s =       1763 ns, mean of 5672 iterations
> >    Speed test: expm1l
> >      1.587e-06 s =       1587 ns, mean of 6300 iterations
> 
> Could I ask what compiler (and version) you're using? I get:

These results were with gcc 4.2.4 with (this is the more relevant part,
I think) glibc  2.8_p20080602 on x86_64 Linux system. 

> > After:
> > 
> >    Speed test: pow
> >      1.289e-06 s =       1289 ns, mean of 7758 iterations
> >    Speed test: expm1
> >       1.553e-06 s =       1553 ns, mean of 6439 iterations
> 
> Might your compiler treat pow() as an intrinsic? I kind of wonder how
> anything could be faster than the 'expm1.c' implementation, 

Sorry, implementation of what? As far as I can tell, neither expm1l()
nor log1pl() from expm1.c are used on my system, because glibc provides
both.

Vaclav





reply via email to

[Prev in Thread] Current Thread [Next in Thread]