Fast math lib

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

Wondering if there is a fast math lib available somewhere to replace math.h

Post

The most operations in <cmath> (or <math.h> if you programm in plain old C) could only be faster if they are instrinsic, but that's a matter of the compiler not the library.

Post

Or taking advantage of SSE / MMX / Whatnot. But to make such a library I guess it's most suited for algebra.
Stefan H Singer
Musician, coder and co-founder of We made you look Web agency

Post

Thanks for the info.

Was looking at Intels Vector Math Library, but from what I gather this works on vectors and not scalers, which is what I need.

My main problem is that I have a lot of exp(...) and tan(...) calls and its choking my processor.

Post

gav_b wrote:My main problem is that I have a lot of exp(...) and tan(...) calls and its choking my processor.
If the input domain of those functions is controllable, consider using a table lookup or polynomial approximation to them.

Most math libraries not specifically designed for audio are going to be more concerned with accuracy than audio needs.
Image
Don't do it my way.

Post

Yeah. Google for some taylor series for exp and tan :)
Stefan H Singer
Musician, coder and co-founder of We made you look Web agency

Post

lookm for a compiler switch that disables IEEE-compatibility. E.g. -ffast-math on gcc. You can gain a lot of speed by doing this.

Post Reply

Return to “DSP and Plugin Development”