Estimating memory use?

Roy Smith roy at panix.com
Sun Nov 27 19:52:00 CET 2005


In article <1h6olhu.12xxjwh12leq0gN%aleax at mail.comcast.net>,
 aleax at mail.comcast.net (Alex Martelli) wrote:

> Roy Smith <roy at panix.com> wrote:
>    ...
> > Is there any easy way to find out how much memory a Python object takes?
> 
> No, but there are a few early attempts out there at supplying SOME ways
> (not necessarily "easy", but SOME).  For example, PySizer, at
> <http://pysizer.8325.org/>.
> 
> 
> Alex
>   

Looks interesting, thanks.

I've already discovered one (very) surprising thing -- if I build a dict 
containing all my regexes (takes about 3 minutes on my PowerBook) and 
pickle them to a file, re-loading the pickle takes just about as long as 
compiling them did in the first place.



More information about the Python-list mailing list