i think i've always used method 5 . .. . because of nasty crashes with dynamic allocation... which i didn't want to debug...
i didn't know it was also the best as regards to performances :-)
yves/
Krzysztof Czaja wrote:
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