Python on 64 bit/IA-64 ...
trentm at activestate.com
Tue May 9 20:39:48 CEST 2000
On Tue, May 09, 2000 at 02:19:16PM +0530, Shiv Shankar Ramakrishnan wrote:
> Has there been any work done to make Python take advantage of a full 64
> bit environment? More specifically is anyone working on an Intel IA-64
> port of Python?
A bunch of people. ActiveState (mainly me) is working on porting Python to
IA-64. (You can find a couple of press releases on our website) This means
porting it to the quirky data models (LP64 or LLP64) and C libraries and
compilers of the various OSes and vendors. Mark Favas (I hope he doesn't mind
me mentioning him) has had success compiling and running Python on TruUnix64
(sp?). Python has worked for a long time on 64-bit systems not on IA-64, e.g.
on Alpha machines.
> In particular if one were to change the sources for this then which data
> model would one follow - LP64 or LLP64 (P64)? Which model have people
> used for existing 64 bit platforms if they did a port?
The data model is chosen by the compiler/C library, not by Python. So on
trillian (64-bit linux) and on any 64-bit UNIX adhering to the Single Unix
Specification Python follows the LP64 data model. On Win64, Python will
follow the LLP64 (or P64, same thing different name) data model. It is a
little bit of a pain to have the different data models to deal with but that
is what keeps us compsci people in business right? :)
> AFAIK Python Int is now mapped to a 32 bit int and Long is unlimited
> precision (emulation). Floating points are m/c dependent but mostly
A PyInt is defined to be a C long. A PyFloat is a C double.
> So this is what I think might be good for IA-64 -
> Pointers - All 64 bit.
> Int - 64 bit.
> Long - As it is now.
> Floating Point - double (As now) or should it be long double?
Because Python choses to tie its PyInt to a C long, the actual size of a
PyInt depends on the data model for the platform on which Python is running.
I am not a big numerical analysis guy so I don't know about changing PyFloat
to be a long double. That is Guido's decision, although I wouldn't bet on
> Any comments? Also any general advice on doing a 64 bit port of Python.
> Things to watch out for? Pitfalls etc ...
Note that the code for the 64-bit ports of Python is the same code for Python
on any other system, i.e. that main Python CVS repository (see
General advice: Play with compiling Python on your 64-bit system of choice.
If you encounter bugs then raise the alarm and submit patches (see
Here are some links:
trentm at activestate.com
More information about the Python-list