[issue21922] PyLong: use GMP

2021-03-07 Thread Sergey B Kirpichev
Change by Sergey B Kirpichev : -- nosy: +Sergey.Kirpichev ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21922] PyLong: use GMP

2014-09-30 Thread STINNER Victor
STINNER Victor added the comment: Can we close this issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21922 ___ ___ Python-bugs-list mailing

[issue21922] PyLong: use GMP

2014-09-30 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21922 ___

[issue21922] PyLong: use GMP

2014-07-14 Thread Case Van Horsen
Case Van Horsen added the comment: I've successfully tested the patch. The patch works fine but there are a couple of issues: 1) The patch relies on several new low-level functions that were introduced in the latest release of GMP 6.0.0. Most Linux distributions are still providing older

[issue21922] PyLong: use GMP

2014-07-14 Thread Mark Dickinson
Mark Dickinson added the comment: When GMP encounters a memory allocation failure (exceeding the limits above or when running our of scratch space), it will just abort. Ouch; that's not friendly. Seems like this is part of the reason that Armin Rigo abandoned the attempt to use GMP in

[issue21922] PyLong: use GMP

2014-07-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: I agree with all of Mark's objections. Unless there is a compelling win, Python is better-off without the maintenance, portability, and licensing issues. I have vague memories of this having been discussed a long time ago and it is unlikely that there

[issue21922] PyLong: use GMP

2014-07-12 Thread Case Van Horsen
Changes by Case Van Horsen cas...@gmail.com: -- nosy: +casevh ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21922 ___ ___ Python-bugs-list mailing

[issue21922] PyLong: use GMP

2014-07-12 Thread Mark Dickinson
Mark Dickinson added the comment: ... and if there's one person who's *very* well placed to comment on the ease or difficulty of keeping up with GMP/MPIR (especially on Windows), it's Case Van Horsen, who I notice has recently added himself to the nosy. @casevh: any comments? --

[issue21922] PyLong: use GMP

2014-07-12 Thread Case Van Horsen
Case Van Horsen added the comment: Disclaimer: as Mark alluded to, I maintain gmpy2. Some comments on MPIR/GMP: For all practical purposes, building GMP on Windows requires some version of the mingw compiler toolchain. None of the performance gains of custom assembly code is available if GMP

[issue21922] PyLong: use GMP

2014-07-08 Thread Mark Dickinson
Mark Dickinson added the comment: IMO you must discuss the GMP license on the python-dev mailing list I think the maintenance implications of having another external dependency would also need discussion on python-dev. -- ___ Python tracker

[issue21922] PyLong: use GMP

2014-07-08 Thread Mark Dickinson
Mark Dickinson added the comment: Hmm. Looking back at my previous comments, I should explain my negativity a bit better. 1. Like Victor's issue 1814 work, this is great stuff, and very impressive. 2. I'm really not convinced that it belongs in the Python core. To expand on 2: we already

[issue21922] PyLong: use GMP

2014-07-08 Thread Mark Dickinson
Mark Dickinson added the comment: Previous python-dev discussions: https://mail.python.org/pipermail/python-dev/2008-November/083315.html https://mail.python.org/pipermail/python-3000/2007-September/010718.html [Regarding the ancient mpz module, which used to be part of Python]

[issue21922] PyLong: use GMP

2014-07-07 Thread Hristo Venev
Hristo Venev added the comment: After optimization, tests on small ints ( 2**30) Currently only addition, subtraction, negation and ~ are a bit slower ( 5%). Most other operations are the same. Bitwise operators, //, %, ** and pow are faster. Converting to and from strings is a bit faster.

[issue21922] PyLong: use GMP

2014-07-07 Thread STINNER Victor
STINNER Victor added the comment: IMO you must discuss the GMP license on the python-dev mailing list since we wrote that if the GMP patch is accepted, it will not be optional and so affect all platforms. -- ___ Python tracker

[issue21922] PyLong: use GMP

2014-07-05 Thread Hristo Venev
New submission from Hristo Venev: I have implemented the PyLong interface using the GMP mpn functions. API/ABI compatibility is retained (except for longintrepr). It can be enabled by passing --enable-big-digits=gmp to ./configure. No large performance regressions have been observed for small

[issue21922] PyLong: use GMP

2014-07-05 Thread Stefan Krah
Stefan Krah added the comment: Did you mean to upload a patch? -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21922 ___ ___

[issue21922] PyLong: use GMP

2014-07-05 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +mark.dickinson, rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21922 ___ ___

[issue21922] PyLong: use GMP

2014-07-05 Thread STINNER Victor
STINNER Victor added the comment: Hi, I worked on a similar patch 6 years ago, while Python 3.0 was developped: https://mail.python.org/pipermail/python-dev/2008-November/083315.html http://bugs.python.org/issue1814 The summary is that using GMP makes Python slower because most numbers are

[issue21922] PyLong: use GMP

2014-07-05 Thread Hristo Venev
Hristo Venev added the comment: PyLongObject is a PyVarObject. It contains many mp_limb_t's. There is little overhead. For some operations if the result is in [-20;256] no memory will be allocated. There are special codepaths for 1-limb operations. And I just finished GDB support. Please

[issue21922] PyLong: use GMP

2014-07-05 Thread Stefan Krah
Stefan Krah added the comment: Hmm, the license (LGPL) should only matter for the Windows binaries and we can just compile without --enable-big-digits=gmp. Even *if* the Windows binaries were built with gmp support, it would be sufficient for any redistributor to point to the external library

[issue21922] PyLong: use GMP

2014-07-05 Thread Josh Rosenberg
Changes by Josh Rosenberg shadowranger+pyt...@gmail.com: -- nosy: +josh.rosenberg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21922 ___ ___

[issue21922] PyLong: use GMP

2014-07-05 Thread Hristo Venev
Hristo Venev added the comment: After some minor optimizations my implementation is about 1.8% slower on pystone and about 4% slower on bm_nqueens. It's 4 times faster on bm_pidigits. -- ___ Python tracker rep...@bugs.python.org

[issue21922] PyLong: use GMP

2014-07-05 Thread STINNER Victor
STINNER Victor added the comment: Please try the Python benchmark suite. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21922 ___ ___

[issue21922] PyLong: use GMP

2014-07-05 Thread Mark Dickinson
Mark Dickinson added the comment: I *do* have an objection to adding the configure option: from that point on, it means that maintaining the GMP-based long implementation is now the responsibility of the core developers, and I think that's an unnecessary maintenance burden, for an option

[issue21922] PyLong: use GMP

2014-07-05 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +tim.peters ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21922 ___ ___ Python-bugs-list

[issue21922] PyLong: use GMP

2014-07-05 Thread STINNER Victor
STINNER Victor added the comment: I think having two long integer implementations in the core is worse than having one. I agree. If the GMP implementation is accepted, the old implementation must be dropped and replaced by the GMP implementation. --

[issue21922] PyLong: use GMP

2014-07-05 Thread Mark Dickinson
Mark Dickinson added the comment: If the GMP implementation is accepted, the old implementation must be dropped and replaced by the GMP implementation. Agreed. I'm open to that, but it's critical that common use-cases (i.e., those *not* using 1000-digit integers!) aren't slowed down.

[issue21922] PyLong: use GMP

2014-07-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note that we could probably release the GIL in the current implementation, too - we just haven't bothered adding such an optimization. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org