Help with finding how much memory a variable is using
Dave Cole
djc at object-craft.com.au
Tue Feb 27 05:13:17 EST 2001
>>>>> "Emile" == Emile van Sebille <emile at fenx.com> 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
--
http://www.object-craft.com.au
More information about the Python-list
mailing list