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

Bug#585430: marked as done (Problem of performance of pow operator in libm library on x86_64 architecture (etch or lenny))



Your message dated Fri, 18 Dec 2015 19:02:29 +0100
with message-id <20151218180229.GA18106@aurel32.net>
and subject line Re: Problem of performance of pow operator in libm library on x86_64 architecture (etch or lenny)
has caused the Debian Bug report #585430,
regarding Problem of performance of pow operator in libm library on x86_64 architecture (etch or lenny)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
585430: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=585430
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libc6
Status: install ok installed
Installed-Size: 11456
Architecture: amd64
Version: 2.7-18lenny2

As demonstrated by attached sample case.cc, "pow" operator evaluation, in the case it calls "slow_pow" method, is showing very poor performances. This problem does'nt occur on 32 bits architectures but on 64 bits ones (lenny and etch). Up to now, I have bypassed this problem using amd library amdlibm instead of libc.
#include <stdio.h>
#ifdef AMDLIBM
# include <amdlibm.h>
#define ::pow amdpow
#else
# include <math.h>
#endif


//#define pow(x,y) exp(y*log(x))
int main(){ 
   double x,x0=1.00000000000002;
   x = x0;
   
   int i; 
   for( i=1; i<1000; i++ ) { 
      if( x > x0 ) x = x0 ;
      x = ::pow( x, 1.05 );
        
   } 
   printf( "x = %1.30f\n", x ); 
}


--- End Message ---
--- Begin Message ---
Version: 2.19-1

On 2010-06-10 15:51, Lionel CHAILAN DPAM/SEMIC/LIMSI (EXT) wrote:
> Package: libc6
> Status: install ok installed
> Installed-Size: 11456
> Architecture: amd64
> Version: 2.7-18lenny2
> 
> As demonstrated by attached sample case.cc, "pow" operator evaluation, in
> the case it calls "slow_pow" method, is showing very poor performances.
> This problem does'nt occur on 32 bits architectures but on 64 bits ones
> (lenny and etch).
> Up to now, I have bypassed this problem using amd library amdlibm instead of
> libc.

> #include <stdio.h>
> #ifdef AMDLIBM
> # include <amdlibm.h>
> #define ::pow amdpow
> #else
> # include <math.h>
> #endif
> 
> 
> //#define pow(x,y) exp(y*log(x))
> int main(){ 
>    double x,x0=1.00000000000002;
>    x = x0;
>    
>    int i; 
>    for( i=1; i<1000; i++ ) { 
>       if( x > x0 ) x = x0 ;
>       x = ::pow( x, 1.05 );
>         
>    } 
>    printf( "x = %1.30f\n", x ); 
> }
> 

This problem has been solved in the jessie version. I am therefore
closing the bug.

Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net

--- End Message ---

Reply to: