This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: Help Needed for gcc on Linux x86_64
- From: "Ashwani Bhat" <ashwanib at cadence dot com>
- To: "satyaakam goswami" <satyaakam at gmail dot com>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Thu, 18 May 2006 16:01:25 +0530
- Subject: RE: Help Needed for gcc on Linux x86_64
I have checked on AMD and that is where I get this issue...
-Ashwani
-----Original Message-----
From: satyaakam goswami [mailto:satyaakam@gmail.com]
Sent: Thursday, May 18, 2006 4:00 PM
To: Ashwani Bhat
Cc: gcc-help@gcc.gnu.org
Subject: Re: Help Needed for gcc on Linux x86_64
do you see these performance issue on any specific processors ?? as in
Intel or AMD...
Satya
On 5/18/06, Ashwani Bhat <ashwanib@cadence.com> wrote:
> On Linux 64 bit platform, gcc shows poor performance for pow()
> function when the first argument is very close to 1. To reproduce the
> issue, just create a simple c file case.c
>
> Contents of case.c
> ==================
> #include <stdio.h>
> #include <math.h>
>
> int main(){
> double x;
> int i;
> for( i=1; i<10000; i++ ) {
> x = pow( 1.0000000000000002, 1.5 );
> }
> printf( "x = %1.30f\n", x );
> }
>
> then compile it
> % gcc -lm -m64 case.c -o case
> % ./case
>
> Notes
> 1. gcc option -ffast-math does not help here 2. if compiled with
> "-m32" instead of "-m64", then the calculation is fast.
>
> Can you please help me here .. I have tried it with gcc -v3.2.3,
> 3.4.2, 4.1.0. But results are same.
>
>
> Thanks and regards,
> ------------------------------
> Ashwani Bhat
> /Grid Common Tools Team
> ashwanib@cadence.com
> ------------------------------------------
>