[Python-Dev] Optionally using GMP to implement long if available (original) (raw)

"Martin v. Löwis" martin at v.loewis.de
Tue Nov 4 00:20:36 CET 2008


One optimization that could be done to the existing Python longobject code is to allow it to use larger digits. Currently it is hardcoded to use 15bit digits.

The most common desktop+server CPUs in the world (x86) all support efficient 32bit*32bit -> 64bit multiply so there is no good reason to limit python itself to 15bit digits when on either x86 or x8664.

Perhaps Tim Peters should also comment here - but if you can come up with a patch that does that in a portable way, I would be in favor. The challenge, ISTM, is to make it still compile on all systems (regardless of how inefficient it might be on minor platforms).

Regards, Martin



More information about the Python-Dev mailing list