Changing intobject to use int rather than long

Chris Mellon arkanes at gmail.com
Tue Dec 18 13:24:36 EST 2007


On Dec 18, 2007 11:59 AM, Clarence <clarence1126 at gmail.com> wrote:
> Does anyone think (or know) that it might cause any internal problems
> if the ival member of the struct defining an intobject were to be
> changed from its current "long int" to just "int"?
>
> When you move your application to a 64-bit system in order to get a
> bigger address space to store your millions/billions of integers in
> RAM, but they get twice as big, you don't gain very much.
>

Your int objects get twice as large, but you get 4294967296 times more
address space.

(They don't always get twice as large, and you don't actually get that
much address space, and there's lots of other things wrong with this
answer, but the core truth - that your available address space grows
at a greater rate than the size of your ints - is correct).

> Thanks.
> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list