This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients h.venev, mark.dickinson, rhettinger, skrah, vstinner
Date 2014-07-05.12:43:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Hi, I worked on a similar patch 6 years ago, while Python 3.0 was developped:

The summary is that using GMP makes Python slower because most numbers are small: fit in [-2^31; 2^31-1], and GMP allocation is expensive.

There is also a license issue: GMP license is GPL which is not compatible with the Python license.

If you want to work on large numbers, you can gmpy:

The following testcases yield 42x performace improvement:
- 16384-bit RSA on 8 threads on quad-core with HT # GIL released
- Multiplying 5600000-bit ints
- Dividing 6000000-bit ints
- Converting 300000-character str to int(base=10)
- Converting 1250000-bit int to str

That's not a common use case. Run the Python benchmark suite with your patch to see if your patch has a similar overhead than my old patch.
Date User Action Args
2014-07-05 12:43:01vstinnersetrecipients: + vstinner, rhettinger, mark.dickinson, skrah, h.venev
2014-07-05 12:43:01vstinnersetmessageid: <>
2014-07-05 12:43:01vstinnerlinkissue21922 messages
2014-07-05 12:43:01vstinnercreate