[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: ARTS_1_1_BRANCH: arts/soundserver
From:       Matthias Kretz <kretz () kde ! org>
Date:       2003-08-01 9:20:45
[Download RAW message or body]


On Friday August 1 2003 01:51, Michael Matz wrote:
> Just simply use fabs() and be done with it.

OK, thanks.
But my question originally was not whether the float loses precision, but 
whether the fabs() call on a float uses more instructions than a fabsf() on a 
float. /me is doing some gcc 3.3 testing and looking at the resulting (not 
optimized) assembler code. Too bad I don't know x86 assembly.

This is the fabs call:
       flds   -4(%ebp)
       fabs
       fstps  -8(%ebp)

And the fabsf call:
       movl   -4(%ebp), %eax
       andl   $2147483647, %eax
       movl   %eax, -8(%ebp)

Looks like that's all I needed to know. So actually it does not make any 
difference performance wise if I use fabs or fabsf...

-- 
C'ya
        Matthias
________________________________________________________
Matthias Kretz (Germany)                          <><
http://Vir.homeip.net/
MatthiasKretz@gmx.net, kretz@kde.org,
Matthias.Kretz@urz.uni-heidelberg.de

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic