Lots of good stuff to think about Gabriel -- btw on this topic, I've
profiled Gabriel's SSE IIR filters and they give some very nice improvements
on my Core 2 Duo laptop -- something like a 2x speedup from 16% to 8% of
time spent in callback. He also reports lots of speedups for e.g. Intel Atom
and other netbook CPUs, so those patches will likely land in trunk soon.
RJ
On Tue, Apr 5, 2011 at 8:18 PM, Gabriel M. Beddingfield
<[email protected]>wrote:
> On Sunday, April 03, 2011 01:27:34 am RJ Ryan wrote:
> > Hey all,
> >
> > I'm messing around with tcmalloc and google-perftools.
> > Check out the attached callgraph, focused on
> > EngineMaster::process
> >
> > No surprises here.. we need to speed up those EQs.
>
> Cool chart! FWIW, I ran into 3 things while working on IIR
> filter optimization:
>
> - SIMD/SSE operations are much more complex is the buffers
> are not aligned.[1] Since portaudio can't guarantee
> the buffer alignment, it's worth considering allocating
> your own. They don't have to be... but it makes the
> code a LOT easier to read and write.
>
> - In the inner loop, cache misses are a big bottleneck.
> For example, if you read/write a class member variable
> during the inner loop, it will typically have to go
> out of the cache to refresh the variable. On the IIR
> filter I would pop my state to local variables and then
> push them back to the class on exit.
>
> - At the next higher level, cache misses also cause a
> very big bottleneck. I didn't dig in to why... but
> my guess is that Mixxx is running the 3 filters in
> total parallel and then mixing them down.
>
> For that last point... I have more to say, but I'm not sure
> what you're doing with temporary buffers and how you're
> mixing the buffers. (E.g. I know some apps would try to mix
> the filters with something like out[k] = lo[k] + mid[k] +
> hi[k]; -- and this causes cache misses.)
>
> -gabriel
>
> [1] When talking about SIMD, "aligned" means that the
> pointer is 16-byte aligned. In other words:
> assert( 0 == (((intptr_t)ptr) % 16) )
>
>
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> Mixxx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mixxx-devel
>
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Mixxx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mixxx-devel