On Dec 18, 6:58 pm, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> I don't think changing the underlying type will help at all. The
>
> On a 64-bit machine, that's 16 bytes for PyObject_HEAD and 8 more
> bytes for the value, 24 bytes total. Changing long to int won't
> decrease the struct size to 20 because the compiler will pad it to 24,
> the nearest multiple of 8. (Forcing the compiler to pack the struct
> won't help because malloc will still pad it for you.)
That's an excellent point. And true, too. Thanks, that will lay the
issue
to rest.
> If you need to store millions of integers compactly, maybe
> array.array('i') can help.
--
http://mail.python.org/mailman/listinfo/python-list