[Ardour-Dev] Hello, some tech talk, etc.

Gabriel M. Beddingfield gabriel at teuton.org
Sat Jul 7 12:01:00 PDT 2012


Hi Fons,

On 07/07/2012 06:15 AM, Fons Adriaensen wrote:
> Most time seems to go into the float to integer
> conversion that is part of _sincos->ind(). There
> is no way to avoid that, except by replacing the
> sine/cosine lookup tables by real calls to sinf()
> and cosf(), but that's even worse.

Based on past experience, I would bet the the problem is *not* the 
float-to-int conversion but a memory access problem (cache miss).  I.e. 
when you access some data, it causes the CPU to refresh its cache.  In 
C++, it's easy to hit this problem by accessing a member variable of 
your class (pointer-to-pointer-to-data).

Can you post a disassembly+source ?  Did you compile for 32-bit or 
64-bit? (gcc's 64-bit optimiser is scads better than the 32-bit one. 
E.g. the 64-bit optimiser will easily vectorize loops that the 32-bit 
code won't.)

-gabriel




More information about the Ardour-Dev mailing list