[Python-Dev] Optionally using GMP to implement long if available
victor.stinner at haypocalc.com
Mon Nov 3 21:41:33 CET 2008
Le Monday 03 November 2008 18:56:37 Paul Miller, vous avez écrit :
> I've read some of the past discussion about including GMP into the
> python core and understand the reasons for not doing so.
Please, check this issue: http://bugs.python.org/issue1814
I patched Python3 to use GMP because I thaugh that GMP is much faster than
Python for integer computation. The "problem" is that GMP target are integers
much bigger than 10**100. As I remember, GMP has a special hack for very
small integer: integer which can be stored in one CPU word, but it's not
enough to speed up Python.
With my last patch, with GMP, Python is 2% *slower*.
My patch can be improved, but I expected +20% to +100% to no -2% :-/
And there is also the license issue...
Victor Stinner aka haypo
More information about the Python-Dev