Re: OT : Approximate / fast math libraries ?



Hi,

On Friday 31 August 2007 8:48:49 pm Globe Trotter wrote:
Btw, I usually use -O3 rather than -O2. I agree with the other poster: I am
not sure getting rid of precision is a great idea.

I don't have overall control, so cannot just switch to -03 myself. I did try
it out though and it didn't make a lot of difference. Maybe I should
investigate that a little deeper though to make sure something wasn't wrong.

Also, I agree with you in general on the precision, just in one particular
case I know I need much less than I am currently getting, and using atan2
seems to be taking significant cpu (w.r.t. the rest of the method, i.e. 50%
or so).

Chris


Trotter

----- Original Message ----
From: Chris Jones <jonesc@xxxxxxxxxxxxxxxxx>
To: For users of Fedora <fedora-list@xxxxxxxxxx>
Sent: Friday, August 31, 2007 2:41:56 PM
Subject: Re: OT : Approximate / fast math libraries ?

Hi,

Thanks for your feedback.

What exactly is your need? Contact me off-list and maybe I can
help. Have you profiled your code? I have found that people
often do not actually know where their code is spending its
time. I once sped up an app which was universally acknowledged
to be slow "because it uses floating point." I sped it up 3x.

Yes, I have profiled the code, quite extensively, using the
valgrind/calltree application. From this I know this that I'm know I've
tidying up this to the point where its hard to find big improvements, the
cpu time is fairly well spread around, not isolated in a few places. So am
now looking a a few places where math calls are taking more time than I
would hope. I'm not going to get factors in speed in the overall
application, but I hope in a few places things can be improvemed a lot
locally.

Also, the project is not small, massive in fact, and I'm only writting one
small part. If you are interested you can find it here

http://lhcb-release-area.web.cern.ch/LHCb-release-area/DOC/brunel/releases/
latest/doxygen/index.html

It also has to be supported on a *lot* of hardware. Basically gcc 3.2.3
based Scientific Linux 3 machines, gcc 3.4.6 SL4 machines (32 and 64 bit)
and (not my decision), windows VC 7.1. I cannot rely on for instance SSE
math calls etc.

Taking an example from another thread, one place I'm trying to understand
is where I use atan2 see

http://www.hep.phy.cam.ac.uk/~jonesc/atan2.png

for the profiler output. atan2 is taking 50% of the time of this method.
Not here I don't need that much precision on the result - say +-
O(2*pi/100). Anything you can suggest here - The code is here

http://www.hep.phy.cam.ac.uk/~jonesc/RichPhotonRecoUsingCKEstiFromRadius.cp
p

( note though its full of internal classes etc...)

cheers Chris

I modified the parsing routines it used, not the floating point.

Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list






___________________________________________________________________________
_________ Pinpoint customers who are looking for what you sell.
http://searchmarketing.yahoo.com/


--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list



Relevant Pages

  • Re: OT : Approximate / fast math libraries ?
    ... Subject: OT: Approximate / fast math libraries? ... for the profiler output. ... atan2 is taking 50% of the time of this method. ... I modified the parsing routines it used, not the floating point. ...
    (Fedora)
  • Re: Xilinx "somethings wrong" error
    ... as these vectors are, without the sizing headaches. ... -- Numeric_Std natively does modulo based math ... -- integer based math does full precision math: ... group - note the enhancement is not the LRM text - LRM ...
    (comp.lang.vhdl)
  • Re: Amplitude response of a Biquad Filter
    ... I did not venture too much into the math, ... I put a gain of +12 dB for all the bands. ... I think you are a victim of 16 bit precision. ... there is serious problem with a high sampling frequency and my first band ...
    (comp.dsp)
  • Re: Glaring Excel calc bug.
    ... referring to the conversion issues. ... Using BCD does not eliminate the issues of finite precision arthmetic, ... math, instead of having to do binary conversions? ... You get 0 from =1.01-1-0.01 (removing the parentheses) because Excel is ...
    (microsoft.public.excel)
  • Re: Which free software could acquire 48 bits color depth pictures from a scanner ?
    ... Which, of course, is meaningless unless you define the format of the ... floating point math on it and expect to keep the level of precision ...
    (rec.photo.digital)