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