[Python-Dev] proposal: add basic time type to the standard library

Guido van Rossum guido@python.org
Sat, 09 Feb 2002 08:55:07 -0500

> 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/)