Re: [LAD] vectorization

From: Christian Schoenebeck <cuse@email-addr-hidden>
Date: Wed Apr 16 2008 - 11:13:04 EEST

Am Mittwoch, 16. April 2008 09:19:19 schrieb Christian Schoenebeck:
> But if you're totally sceptical, you could simply move out the mixing
> functions into an own C++ file, compile that object file with maximum
> optimization, and compile the actual benchmark application with just "-O1"
> or something.

Which I just did, and this time the assembly result is equal to the gcc vector
result:

Benchmarking mixdown (no coeff):
pure C++ : 680 ms
ASM SSE : 200 ms
GCC vector extensions : 200 ms

Benchmarking mixdown (WITH coeff):
pure C++ : 1100 ms
ASM SSE : 310 ms
GCC vector extensions : 300 ms

because that way the compiler is forced to compile the gcc vector solution
with real function calls, whereas in yesterday's benchmark the C++ and gcc
vector functions were simply inlined (I checked the compiler's assembly
output). But in practice you would make those short functions inliners
anyway. And even if it's "just" as good as hand crafted assembly code, it's a
lot easiear to maintain compared to assembly and compiles (and optimizes) for
other architectures as well. So I'm definitely on the vector train now ...

CU
Christian
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Wed Apr 16 12:15:04 2008

This archive was generated by hypermail 2.1.8 : Wed Apr 16 2008 - 12:15:04 EEST