[Python-Dev] 64-bit process optimization 1
Mon, 09 Sep 2002 14:16:18 -0400
> So perhaps the refcnt should have been a long in the first place.
We agreed to that years ago, but never bothered to change it. In fact, you
used to tell people it *was* a long until I beat that out of you <wink>.
Do note that a long is still only 4 bytes on Win64. The type we really want
here is what pyport.h calls Py_intptr_t (a Python spelling of the
appropriate C99 type; C99 introduced ways to say what you really mean in
> A similar argument may hold for the length of e.g. strings and lists:
> one could wish to have a list of more than 2 billion elements, or a
> string containing more than 2 gigabytes (that much RAM is easily found
> on the larger 64-bit servers, I believe).
Those are more naturally addressed by size_t, since strlen and malloc are
constrained to that type. I generally declare string-slinging code as using
size_t vars now, and endure the pain of casting back and forth to int to
talk with Python's idea of a string size.
Whether it's worth the pain to change this stuff depends on whether we think
64-bit boxes are just another passing fad like the Internet <wink>.