CPU usage of data structures [was: Re: [PD] Re: new pmpd developer]
Frank Barknecht
fbar at footils.org
Tue Mar 15 22:17:48 CET 2005
Hallo,
Frank Barknecht hat gesagt: // Frank Barknecht wrote:
> Another test I did was in the opposite direction: I suspected, that
> maybe access to the array data is slowing things down. So I added
> another field to the mass-struct for color. I then colorized the
> movable mass on the house's roof. ;)
Okay, inspired by this I now tried some more things to optimize
setting array data, with good results actually: CPU usage was about
halfed (no real benchmark data).
In attached patch I replace the many "set" patches which always just
set one single field in an array by abstractions, which use only one
[set] inside to set fields in one go. Those are mass-setter.pd and
link-setter.pd. They also carry the pmpd-objects inside, which makes
the patches clearer.
This turns out to be a big performance boost.
Morale of story (so far): Use the least amount of [set] object,
concentrate on bundling [set]. This was news to me, too, thanks for
hitting my head at this problem. ;)
Ciao
--
Frank Barknecht _ ______footils.org__
_ __latest track: "scans" _ http://footils.org/cms/show/41
-------------- next part --------------
A non-text attachment was scrubbed...
Name: faster.tgz
Type: application/x-gtar
Size: 3884 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20050315/102759d9/attachment.tgz>
More information about the Pd-list
mailing list