[linux-audio-dev] Channels and best practice

Alfons Adriaensen fons.adriaensen at alcatel.be
Tue Nov 15 13:49:01 UTC 2005


On Tue, Nov 15, 2005 at 02:12:55PM +0100, Jens M Andreasen wrote:

(good to see you're back on line :-)

> On a related subject: How is level one cache replaced with new data,
> should one (or ones compiler) decide to use some of the prefetch
> instructions available from Intel PII and up? It would make sense to
> fetch the next dataset while doing what has to be done "now". On the
> other hand, overwriting the current dataset is somewhat counter
> productive.

Unless you're hand-coding assembly it's probably wisest to leave this
to the compiler. OTOH, I've no idea how smart gcc/g++ is in this respect.
It could be quite interesting to -S some familiar DSP code and have a
look at the result. 

The only place where I've seen prefetch used explicitly is in Brutefir's
sse and 3dnow routines which I recently modified for use in one of my own
projects.
  
> The layout of the data would influence these decisions, no?

And conversely, considerations relating to cache use (and possible sse
optimisations) may influence your choice of data formats.

-- 
FA



More information about the Linux-audio-dev mailing list