Thanks for the testing! That's very illustrative and I can confirm an analogous 
behaviour: When nothing is connected to the outlet of [array get]->[drip] resp. 
[until]->[tabread], [drip] will be about 10 times faster, no matter how many 
elements you're accessing. But as soon as you start adding math objects, the 
advantage of [drip] gets eaten up by and by. After adding 20 [exp] objects, 
they will both take about the same time - which is actually quite logical when 
I think of it...

So you totally have a point there! Although being 10x faster for light math 
objects might help in some live situations... The only thing [array drip] would 
provide for sure is some convenience, which could justify the expense of having 
another C object :-p. 

A 'drip' (or call it 'iterate') method for [list] would probably be more 
important, since there's no practical vanilla solution at all, as we have seen 
(except for [list-drip] which uses only vanilla objects, but isn't really part 
of the Pd vanilla distributions).


Christof

> Gesendet: Montag, 05. Oktober 2015 um 20:39 Uhr
> Von: "IOhannes m zmölnig" <[email protected]>
> An: [email protected]
> Betreff: Re: [PD] array-abs
>
> On 10/05/2015 07:57 PM, Matt Barber wrote:
> > Speaking of which, on my machine [array get] is faster than plain
> > [tabread]. It can get lists of about 30 from an array about as fast as
> > [tabread] can get single floats. Weird, but cool.
> 
> hmm, [array get] is indeed faster, but in my tests the difference is
> marginal (and someseldomtimes [tabread] is even a wee bit faster)
> 
> i did a quick implementation of [array drip] and compared it to
> [tabread] and [array get] implementations (both using an
> [until]/[i]/[+1] counter), and the pure C implementation performs about
> 10 times faster.
> 
> some stats:
> 
> values are average of 10 runs, itreating over an (uninitialized (zeroed
> out) table of 1e8 elements)
> 
> #1: ignoring the index completely:
> [array drip]..............: 562
> [array get] implementation: 10624
> [tabread] implementation..: 10390
> 
> 
> #2: creating a value/index list with [pack]:
> [array drip]..............: 1613
> [array get] implementation: 12984
> [tabread] implementation..: 13049
> 
> 
> so the performance of the patch using [array drip] drops significantly
> as soon as patch objects are introduced into the iteration; since this
> is the main use-case of [array drip], it makes a C-implementation even
> less interesting.
> 
> gmfsdr
> IOhannes
> 
> _______________________________________________
> [email protected] mailing list
> UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list
>

_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to