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.