[LAD] vectorization
Sampo Savolainen
v2 at iki.fi
Tue Apr 15 18:12:22 UTC 2008
On Tue, 2008-04-15 at 19:45 +0200, Christian Schoenebeck wrote:
> Yeah, I'm respawning this topic ...
>
> because I was curious how the GCC vector extension situation changed meanwhile
> and wrote a small benchmark for mixing signals with and without gain. You can
> find it here:
>
> http://download.linuxsampler.org/dev/mixdown.tar.gz
>
> I compared a pure C++ implementation vs. the hand crafted SSE assembly code
> (by Sampo Savolainen, Ardour) and of course an implementation utilizing GCC's
> vector extensions. On my very weak, but environment friendly ;-) VIA box the
> GCC vector implementation outperforms the other two solutions (using GCC
> 4.2.3 BTW):
>
> Benchmarking mixdown (no coeff):
> pure C++ : 670 ms
> ASM SSE : 200 ms
> GCC vector extensions : 180 ms
>
> Benchmarking mixdown (WITH coeff):
> pure C++ : 890 ms
> ASM SSE : 300 ms
> GCC vector extensions : 230 ms
Great stuff, very interesting. It seems it's finally getting easier to
vectorize functions. Too bad the code is awfully slow for non-sse
compiles. That still leaves the responsibility of choosing the fastest
algorithms per architecture at runtime to the application developers.
What about gcc 4.3.0 performance? I seem to recall that 4.3 should have
even better vectorization support.
I have to test whether I could squeeze a few more cycles out of
compute_peak(). That algorithm is the sole reason I started writing SSE
for ardour. The function uses a huge amount of computing time without
optimization.
Sampo
More information about the Linux-audio-dev
mailing list