31 Dec
2008
31 Dec
'08
12:40 a.m.
Jesus Cea
Mike Coleman wrote:
I guess if ints are 12 bytes (per Beazley's book, but not sure if that still holds), then that would correspond to a 1GB reduction.
Python 2.6.1 (r261:67515, Dec 11 2008, 20:28:07) [GCC 4.2.3] on sunos5 Type "help", "copyright", "credits" or "license" for more information.
import sys sys.getsizeof(0) 12
On a 32-bit system, sure, but given Mike creates a 45 GB dict, he has a 64-bit system, where ints are 24 bytes:
sys.getsizeof(0) 24 sys.getsizeof(100000) 24
cheers Antoine.