I don't know if this is relevant, but I thought that since it came up I would mention that you can get the size of an array with expr:
[symbol arrayname( | [expr size("$s1")]
should do it.
Matt
My little participation :) A small modification of [list-tabdump] is 40% faster than the original (avoiding to send everytime the new list from [list append] in [list]). ++
Jack
Le jeudi 21 janvier 2010 ? 13:53 +0100, Roman Haefeli a ?crit :
Am 21.01.10 09:57 schrieb "William Brent" unter william.brent@gmail.com:
But is there something in Pd-ext that does this? There must be, right? An external is waaaaaaaay faster for long arrays.
An external will always be faster. However, the patching method still can be optimized a lot. [list-tabdump] copies the same data back and forth and the number-of-elemts/cputime ratio is not linear, but something like 'exponential' (please someone put here the correct term). Attached is a benchmark patch, that compares [tabdump], [list-tabdump] and a patched vanilla version, that has a linear ratio, which makes it a lot faster than [list-tabdump], especially with big arrays (though it is still 10 times slower than [tabdump]).
Roman