Re: OT : Approximate / fast math libraries ?



On Fri, Aug 31, 2007 at 15:48:45 +0100,
Chris Jones <jonesc@xxxxxxxxxxxxxxxxx> wrote:

I have a number crunch application that is starting to hit bottlenecks
in standard maths functions, like log, exp sqrt etc. Thing is, in many
places I don't need much precision, so was wondering if there was
anything I could do, like use a different library or enable some gcc
options (currently using -O2) to speed things up.

Would doing approximations (say with power series) on the math side help?
There are fast math options for gcc. You should read the man page for them
to decide with optimizations are safe for you to use.
There is a project that has some support for using video cards for doing
floating point math. I have tried it myself, but it may be worth looking
into. It will probably be more helpful if your code parallelizes well.

--
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 ?
    ... where math calls are taking more time than I would hope. ... have hardware instructions for trig functions. ... My recollection is that -ffast-math tells gcc to assume error free math. ...
    (Fedora)
  • Re: #include <math.h>
    ... >> I seem to be having trouble with some of my math functions (pow, sqrt, ... >a certain, popular compiler, especially widely used in the Linux world, ... gcc merely follows the common Unix convention, ... Dan Pop ...
    (comp.lang.c)
  • Re: [patch] sched: add locking when update the task_groups cfs_rq[] array.
    ... point math, and on large cpu machines you get into granularity problems. ... Trouble seems to be gcc, which imho f*'ed up by not providing a long ...
    (Linux-Kernel)