Debian Bug report logs - #585430
Problem of performance of pow operator in libm library on x86_64 architecture (etch or lenny)

version graph

Package: libc6; Maintainer for libc6 is GNU Libc Maintainers <debian-glibc@lists.debian.org>; Source for libc6 is src:glibc (PTS, buildd, popcon).

Reported by: "Lionel CHAILAN DPAM/SEMIC/LIMSI (EXT)" <lionel.chailan-assystem@irsn.fr>

Date: Thu, 10 Jun 2010 14:06:02 UTC

Severity: normal

Found in version glibc/2.7-18lenny2

Fixed in version 2.19-1

Done: Aurelien Jarno <aurelien@aurel32.net>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#585430; Package libc6. (Thu, 10 Jun 2010 14:06:05 GMT) (full text, mbox, link).


Acknowledgement sent to "Lionel CHAILAN DPAM/SEMIC/LIMSI (EXT)" <lionel.chailan-assystem@irsn.fr>:
New Bug report received and forwarded. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>. (Thu, 10 Jun 2010 14:06:05 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: "Lionel CHAILAN DPAM/SEMIC/LIMSI (EXT)" <lionel.chailan-assystem@irsn.fr>
To: submit@bugs.debian.org
Subject: Problem of performance of pow operator in libm library on x86_64 architecture (etch or lenny)
Date: Thu, 10 Jun 2010 15:51:19 +0200
[Message part 1 (text/plain, inline)]
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.
[case.cc (text/x-c++src, inline)]
#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 ); 
}


Reply sent to Aurelien Jarno <aurelien@aurel32.net>:
You have taken responsibility. (Fri, 18 Dec 2015 18:06:10 GMT) (full text, mbox, link).


Notification sent to "Lionel CHAILAN DPAM/SEMIC/LIMSI (EXT)" <lionel.chailan-assystem@irsn.fr>:
Bug acknowledged by developer. (Fri, 18 Dec 2015 18:06:10 GMT) (full text, mbox, link).


Message #10 received at 585430-done@bugs.debian.org (full text, mbox, reply):

From: Aurelien Jarno <aurelien@aurel32.net>
To: "Lionel CHAILAN DPAM/SEMIC/LIMSI (EXT)" <lionel.chailan-assystem@irsn.fr>
Cc: 585430-done@bugs.debian.org
Subject: Re: Problem of performance of pow operator in libm library on x86_64 architecture (etch or lenny)
Date: Fri, 18 Dec 2015 19:02:29 +0100
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



Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 16 Jan 2016 07:31:15 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Oct 11 08:30:39 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.