[PD-dev] what's the maximum list size?

IOhannes m zmoelnig zmoelnig at iem.at
Thu Jul 4 10:21:53 CEST 2019


On 04.07.19 00:20, Alexandre Torres Porres wrote:
> how big of a list xcan we have in Pd?

i don't think there's a limit.
i've just successfully created a list of about 690.000.000 elements (all
floats) with [list store], which happens to consume ~50% (according to
htop) of my memory (32GB RAM); whenever i output the list (e.g. to
measure its length with [list length]) the system starts to swap.

the ideal representation of such a list would take 2.5GB of memory (an
array of single precision floats), however, due to Pd's t_atom type it
should take about 10GB on a 64bit system.

whenever you bang [list store], it creates two copies of the stored list
(amounting to about 30GB) which probably explains why it takes so long
to type this email.


> How many elements can a t_atom have?

given that a t_atom is a scalar: one.
(or: i don't understand the question; what do you mean with "element"?)

gnas+
IOhannes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20190704/89b75d54/attachment-0001.sig>


More information about the Pd-dev mailing list