Re: Estimating size of dictionary

2008-11-24 Thread python
Steven, Wonderful! You and your references answered all my questions. I had missed 2.6's new getsizeof() function. Yet another reason to do the 2.5-to-2.6 upgrade. Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Estimating size of dictionary

2008-11-23 Thread python
Is there a formula for determining the approximate size of a dictionary (minus its data) under 32 and 64 bit Python with a specific average key size? For instance, if we were running a 64-bit version of Python and created a dictionary of 1 million items with an average key length of 48 bytes, is

Re: Estimating size of dictionary

2008-11-23 Thread Steven D'Aprano
On Sun, 23 Nov 2008 21:10:34 -0500, python wrote: Is there a formula for determining the approximate size of a dictionary (minus its data) under 32 and 64 bit Python with a specific average key size? If you're using Python 2.6, the sys module has a new function getsizeof() which returns the