[LAD] vectorization

Fons Adriaensen fons at kokkinizita.net
Mon May 5 22:24:28 UTC 2008

On Tue, May 06, 2008 at 12:10:38AM +0200, Jens M Andreasen wrote:

> On Mon, 2008-05-05 at 23:32 +0200, Jens M Andreasen wrote:
> > > clock:  4020 ms (_Complex)
> > > clock:  1550 ms (cvec_t)
> > > clock: 70000 ms (original float array[N][2])
> Wait a second ... It's a trick! :-D
> The compiler splits the iterations up in smaller parts that fits in the
> cache and runs them in succesion.

I've know one what that even more clever. It just noticed I didn't use
the result, and skipped the whole loop.

After each iteration, call an empty function, separately compiled,
that takes all three vectors as arguments (and _not_ as const *
of course). No more tricks. The overhead is peanuts compared
to the calculation.



Laboratorio di Acustica ed Elettroacustica
Parma, Italia

Lascia la spina, cogli la rosa.

More information about the Linux-audio-dev mailing list