Re: [linux-audio-dev] Channels and best practice

2005-11-20 Thread James Courtier-Dutton
Jussi Laako wrote: On Sun, 2005-11-20 at 12:54 +1100, Dave Robillard wrote: Out of curiosity, how expensive is this runtime architechture check? It's done only once at initialization time and even there it's matter of < 100 machine instructions. At runtime the cost is doing integer comparis

Re: [linux-audio-dev] Channels and best practice

2005-11-20 Thread Jussi Laako
On Sun, 2005-11-20 at 12:54 +1100, Dave Robillard wrote: > Out of curiosity, how expensive is this runtime architechture check? It's done only once at initialization time and even there it's matter of < 100 machine instructions. At runtime the cost is doing integer comparison. -- Jussi Laako <

Re: [linux-audio-dev] Channels and best practice

2005-11-19 Thread Luis Garrido
> Out of curiosity, how expensive is this runtime architechture check? > I don't think runtime detection is necessary if you compile both library and app for the specific arch. A few ifdef's take care of the selection at compile time. If you want to provide a multiarch binary, I don't know how he

Re: [linux-audio-dev] Channels and best practice

2005-11-19 Thread Dave Robillard
On Sun, 2005-20-11 at 00:23 +0200, Jussi Laako wrote: > On Wed, 2005-11-16 at 00:05 +0100, Florian Schmidt wrote: > > I think libDSP does prefetch and cache alignment, SIMD, yadayada :) > > > > I don't know though to which degree each one of the functions is > > optimized. Best to ask Jussi himse

Re: [linux-audio-dev] Channels and best practice

2005-11-19 Thread Jussi Laako
On Wed, 2005-11-16 at 00:05 +0100, Florian Schmidt wrote: > I think libDSP does prefetch and cache alignment, SIMD, yadayada :) > > I don't know though to which degree each one of the functions is > optimized. Best to ask Jussi himself (CC'ed) :) Most of the time prefetch is left to compiler (wo

Re: [linux-audio-dev] Channels and best practice

2005-11-15 Thread Florian Schmidt
On Tue, 15 Nov 2005 14:49:01 +0100 Alfons Adriaensen <[EMAIL PROTECTED]> wrote: > 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. I think libDSP does prefetch and cache alignment, SIMD

Re: [linux-audio-dev] Channels and best practice

2005-11-15 Thread Jens M Andreasen
> > 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

Re: [linux-audio-dev] Channels and best practice

2005-11-15 Thread Hans Fugal
On Tue, 15 Nov 2005 at 07:24 -0500, Paul Davis wrote: > On Tue, 2005-11-15 at 11:58 +, James McDermott wrote: > > > What are your thoughts? What is best practice on multichannel audio, or > > > is it always application-specific? > > > > According to my experience and understanding: > > > > -n

Re: [linux-audio-dev] Channels and best practice

2005-11-15 Thread Alfons Adriaensen
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

Re: [linux-audio-dev] Channels and best practice

2005-11-15 Thread Jens M Andreasen
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

Re: [linux-audio-dev] Channels and best practice

2005-11-15 Thread Paul Davis
On Tue, 2005-11-15 at 11:58 +, James McDermott wrote: > > What are your thoughts? What is best practice on multichannel audio, or > > is it always application-specific? > > According to my experience and understanding: > > -non-interleaved (multiple channels in separate arrays) is a bit > eas

Re: [linux-audio-dev] Channels and best practice

2005-11-15 Thread James McDermott
> What are your thoughts? What is best practice on multichannel audio, or > is it always application-specific? According to my experience and understanding: -non-interleaved (multiple channels in separate arrays) is a bit easier to code, but -interleaved could give better performance (because the

[linux-audio-dev] Channels and best practice

2005-11-14 Thread Hans Fugal
I'm writing a library in ruby for dealing with audio data, and I'm faced with a design decision. For several reasons, the best thing to use in ruby for numerical data is NArray[1] which is implemented in C for efficiency. So my code is basically a wrapper around NArray which gives some more specif