
Feb. 9, 2002
7:55 a.m.
WRT RAM usage, a Python int is no smaller than a TimeStamp object.
Wrong, unless TimeStamps also use a custom allocator. The custom allocator uses 12 bytes per int (on a 32-bit machine) and incurs malloc overhead + 8 bytes of additional overhead for every 82 ints. That's about 12.2 bytes per int object; using malloc it would probably be 24 bytes. (PyMalloc would probably do a little better, except it would still round up to 16 bytes.) If TimeStamp objects were to use a similar allocation scheme, they could be pushed down to 16.2 bytes. --Guido van Rossum (home page: http://www.python.org/~guido/)