[Python-Dev] Changing python int to "long long".

"Martin v. Löwis" martin at v.loewis.de
Wed May 24 00:01:10 CEST 2006


Sean Reifschneider wrote:
> The big deal right now is on 32 bit platforms, giving the 64-bits for int.
> However, it will also be a win for 64-bit platforms for ints that fall
> between 64 and 128 bits.

As Guido suggests: long long isn't 128 bits on most 64-bit platforms
(AFAIK).

> My conclusion is that it's probably enough of a performance drop that we
> can't just do it wholesale.  It has a big gain for ints within 32 and 64
> on 32-bit platforms, but for <32-bit ints it's going to be pretty bad.
> Within the next few years many platforms, particularly performance-critical
> ones, will probably be 64 bit anyway, so fewer people will probably be able
> to see an advantage to it.

I'm more worried about the actual breakage instead of the speed loss.

For example, what will the "i" modifier for PyArg_ParseTuple do?
What will PyInt_AsLong do? What about systems where "long long"
is not supported?

Not that those can't be resolved (they were resolved, in some way or
the other, for ssize_t). However, I think a complete specification of
the proposed changes should be available before integrating this
into Python.

Regards,
Martin


More information about the Python-Dev mailing list