Hi Krzysztof,,
I don't really understand, what you're asking. Shall we do experiments on our own and share the results? In my externals I normally use the preallocation method as it guarantees to be somewhat fast, but the getbytes method has its own advantages in being more flexible due to its dynamic nature. Apart from that the getbytes methos can make prototyping in many cases much faster, too (as you don't have to maintain dangling pointers).
-- Orm.
Am Donnerstag, den 06. Juni 2002 um 16:44:51 Uhr (+0200) schrieb Krzysztof Czaja:
hi,
perhaps all the more experienced Pd coders did not notice this thread (or my question was badly posed)? Anyway, I would like to try once again, this time with some measurement data (not very hard data yet)...
...on my system, using method 5 as a reference, on average:
. method 1 performs 2.5 times slower,
. method 4 is 4.25 times slower and has nasty peaks.
For each method there are two objects in my test patch: one outputs a message stored internally (no copying cost in case of method 5), the other appends its internal message to a message passed from the first object.
Whoever likes to try the same (lame) test, and make further experiments, might grab the newest cyclone snapshot, wherein there is a 'testmess' class and a testmess-test.pd test patch.
Krzysztof
Krzysztof Czaja wrote: ...
what is the proper way (fast, robust, surviving Pd api changes) for an external to send arbitrarily long messages, if these messages contain a mix of data acquired through inlets and data stored in an object?
...
- copy data to the main stack, i.e. use a buffer in the local
memory space of a function;
...
- allocate with getbytes() in every call
...
- use a pre-allocated buffer stored in an object's memory space,
PD-dev mailing list PD-dev@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-dev