Help with finding how much memory a variable is using

Rich Somerfield rich_somerfield at
Wed Feb 28 04:24:12 EST 2001

That code would be gratefully received.

rich_somerfield at

Remove the obvious, cheers.


Dave Cole <djc at> wrote in message
news:m33dd0juwy.fsf at
> >>>>> "Emile" == Emile van Sebille <emile at> writes:
> Emile> Can your data be structured using consistent data types?  I
> Emile> recently had a situation where I needed to store a ~100,000
> Emile> element list where each entry consists of 180 floats.  The
> Emile> memory usage was dramatically reduced by converting the data to
> Emile> use the array module.
> Or could you implement a native C datatype on top of which Python
> proxy objects were created on demand?  The C objects could be stored
> in whatever organisation made the most sense, a tree or an array.
> A while ago, I wrote some readonly lazy dictionary / list types which
> could be made to sit on top of a parse tree constructed by a yacc
> grammar (or whatever).
> I still have the code if you are interested.
> - Dave
> --

More information about the Python-list mailing list