tags:

views:

135

answers:

3

Is there a drop-in replacement to glibc's libm (and headers?) for x86_64-linux that is faster?

A: 

Both AMD and Intel have heavily optimized math libraries available for their CPUs. They are not free.

They don't implement simple stuff. These libraries are for fast Fourier transforms, huge matrix problems and other things.

The fast-math compiler option will speed up floating point math a lot. However, you will be responsible for your own error checking.

Zan Lynx
Don't know if it's changed, but AMD at least used to offer the math libraries for free.
Ioan
Do they? I haven't checked lately but I seem to remember needing to pay for Intel's.
Zan Lynx
+2  A: 

The math library distributed with ICC is substantially faster for many of the libm functions, but does require purchasing ICC. I believe you can download a free trial version if you're curious about it. I know that they support Linux, and believe that they try to be drop-in compatible with the GCC library. ICC also includes vectorized implementations of many of the libm functions in the Math Kernel Library, which may be useful to you.

Stephen Canon
A: 

Depending on what exact math functions you are wanting to run and how large of a data set you will be running them on, you may want to take a look at something like CUDA which will let you use the speedy mathematical capabilities of your graphics chip to do your processing.

bta