[LAD] vectorization

Mario Lang mlang at delysid.org
Wed Apr 16 17:25:01 UTC 2008


Christian Schoenebeck <cuse at users.sourceforge.net> writes:

[...]

> So I would say it's finally time to put hands on GCC's vector toys, wasting 
> less time on hairy assembly tasks. I think for such simple algorithms like 
> mixing it's completely sufficient to keep a pure C++ implementation and a GCC 
> vector extension implementation side by side and just automatically determine 
> by a small benchmark in the configure script (or whatever) which one of the 
> two solutions to pick for compilation, dependent on what the user supplied as 
> CXXFLAGS. At least that's what I'm going to do ... I think ...

The distributor in me cried out when I read over this.  I know I am kind
if nitpicking here, but please consider how much nicer this would be if
the small benchmark was run at start up time instead of compilation time.
Its not much more work to compile both algorithms into different object
files and set up a function pointer at startup.  And it will
give you best performance even if you move the precompiled binary
from one machine to the other, or if you change the CPU in your
computer without reinstalling.

Besides, a binary distribution has no chance of knowing the exact
hardware in use on the users side.  The configure test will only benchmark
the build host, which is not really useful.

-- 
CYa,
  ⡍⠁⠗⠊⠕ | Debian Developer <URL:http://debian.org/>
  .''`. | Get my public key via finger mlang at db.debian.org
 : :' : | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44
 `. `'
   `-      <URL:http://delysid.org/>  <URL:http://www.staff.tugraz.at/mlang/>



More information about the Linux-audio-dev mailing list