[PD] array-abs

IOhannes m zmölnig zmoelnig at iem.at
Mon Oct 5 20:39:59 CEST 2015


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20151005/c279e3c7/attachment-0001.sig>


More information about the Pd-list mailing list