C Optimisation Tutorials

C programming forum.

C Optimisation Tutorials

Postby QuantumKnot on February 24th, 2008, 2:59 pm

Image
User avatar
QuantumKnot
Member
 
Posts: 98
Joined: January 21st, 2008, 11:58 am

Re: C Optimisation Tutorials

Postby james on February 25th, 2008, 11:49 am

I have a query realting to finding an optimised 'exp' function. In some Speaker identification code, I use exp a lot during training (in EM algorithm) and in testing (checking each speaker against each gaussian mixture model). After profiling it shows that around 80% of the time is spent in the exp function call. I am just using normal exp function in math.h, does anyone know of any faster implementations?
james
Member
 
Posts: 18
Joined: January 18th, 2008, 2:27 pm

Re: C Optimisation Tutorials

Postby QuantumKnot on February 25th, 2008, 5:49 pm

james wrote:I have a query realting to finding an optimised 'exp' function. In some Speaker identification code, I use exp a lot during training (in EM algorithm) and in testing (checking each speaker against each gaussian mixture model). After profiling it shows that around 80% of the time is spent in the exp function call. I am just using normal exp function in math.h, does anyone know of any faster implementations?


I seem to remember seeing an exp() in the Intel Math Kernel library. It should be optimised to use SSE2 SIMD instructions, which the Athlon64 supports. AMD's ACML would have an exp() too.

You could also try installing the Intel C++ compiler for linux (which is free for non-commercial use). It links to its own math library which is more optimised (ie. uses SSE2 instructions).
Image
User avatar
QuantumKnot
Member
 
Posts: 98
Joined: January 21st, 2008, 11:58 am


Return to C

Who is online

Users browsing this forum: No registered users and 0 guests

dsplabs homelinux bloglinux forums new! travel photographyawklores new! cryptographyjames' home
©2008 dsplabs.com.au