[PD] array copy speed test

Hans-Christoph Steiner hans at eds.org
Wed Aug 9 23:07:54 CEST 2006


On Aug 2, 2006, at 5:22 AM, geiger wrote:

>
> On Tue, 1 Aug 2006, Hans-Christoph Steiner wrote:
>> I have a patch that records to a large buffer, then copies chunks of
>> the buffer array to other arrays, where they are then individually
>> controlled.  I am hoping to do be able to do this very frequently,
>> like 10+ times a second.  I would also like to be able to run this
>> patch on PCs that I find on the street here, like Pentium III 600  
>> MHz.
>
> good luck with SSE then :)
>
> In any case, your patch will be faster and more stable if you find
> another solution to the problem, like accessing the arrays without  
> copying
> them. As Chris explained, copying around large chunks of data in a  
> real
> time environment is not a very good idea.

Its working pretty well as is on an Athlon 1700 (1350MHz, I think).   
What counts as a "large chunk"?  I am mostly copying between 100ms  
and 900ms of mono, 48k, audio data.  Is that large?

I would love to hear suggestions as to how I could do this  
differently.   The problem is that want to have each sound snippet  
stored for a while and separately controllable.  Perhaps I could just  
use a massive buffer as a ringbuffer then use start and end points to  
reference locations in the array.  But at some point, its going to  
have to loop around in the ringbuffer and that could be quite tricky  
to handle well.

.hc




More information about the Pd-list mailing list