[issue1814] Victor Stinner's GMP patch for longs

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

[issue1814] Victor Stinner's GMP patch for longs

2014-04-07 Thread STINNER Victor
STINNER Victor added the comment: > What about using PyVarObject of mp_limb_t and mpn instead of mpz_t? FYI this issue is closed, it's not a good practice to comment closed issue (for example, the issue is hidden in the list of recent issues). If you want to learn more about my old patch, you

[issue1814] Victor Stinner's GMP patch for longs

2014-04-07 Thread Hristo Venev
Hristo Venev added the comment: What about using PyVarObject of mp_limb_t and mpn instead of mpz_t? Addition: - Check signs and allocate. - Possibly compare absolute values. - Call mpn_(add|sub)_n and possibly mpn_(add|sub)_1 if the integers have different sizes. - Overhead for sma

[issue1814] Victor Stinner's GMP patch for longs

2008-12-05 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: I agree that this probably isn't right for core Python. But I think this is valuable work, and it would be nice to see this patch available and maintained somewhere, if anyone has the energy. I'm wondering whether the Sage folks would be i

[issue1814] Victor Stinner's GMP patch for longs

2008-12-05 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: -- resolution: -> rejected status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue1814] Victor Stinner's GMP patch for longs

2008-12-05 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: After many benchmarks, I realized that it's not a good idea to use GMP for the int (and long) integers because most integers are very small: less or equals than 32 bits (or 64 bits on a 64 bits CPU). GMP overhead is too big. See other propo

[issue1814] Victor Stinner's GMP patch for longs

2008-11-13 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Notes: - GNU Common LISP uses CLN, which uses GMP's low-level functions (http://cvs.savannah.gnu.org/viewvc/gcl/gcl/gmp/) - GHC (Haskell compiler, http://haskell.org/ghc/) uses (or used) GMP. But Haskell is a statically typed language, where

[issue1814] Victor Stinner's GMP patch for longs

2008-11-04 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Since it's hard to compare patches, I will now attach the longobject.c. But it would be better to use a DVCS with a branch to test it... Added file: http://bugs.python.org/file11938/longobject.c ___ Pyth

[issue1814] Victor Stinner's GMP patch for longs

2008-11-04 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Updated patch, changes: - fix mashal module - fix all conversion from/to small integer (long, unsigned long, long long, unsigned long long, size_t, ssize_t) - create numbits() method for the long type (see also issue #3439) - catch memory

[issue1814] Victor Stinner's GMP patch for longs

2008-11-03 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11933/py3k-long_gmp-v3.patch ___ Python tracker <[EMAIL PROTECTED]> ___

[issue1814] Victor Stinner's GMP patch for longs

2008-11-03 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9141/py3k-long_gmp-v2.patch ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue1814] Victor Stinner's GMP patch for longs

2008-11-03 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: New version of the patch using short integer for long_add, long_sub, long_mul, etc. New benchmark with -0O : 20161.3 pystones/second (versus 20920.5 for the vanilla version). The overhead is now -3,6% (yes, it's slower with GMP). Added fil

[issue1814] Victor Stinner's GMP patch for longs

2008-11-03 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: And Now for Something Completely Different. Benchmarks! - python3 rev67089. - Pentium4 @ 3.0 GHz (integer = 32 bits) - GCC 4.1.3 (Ubuntu Gutsy) gcc -O0: builtin: 20920.5 pystones/second GMP: 17985.6 pystones/second gcc -O3: builtin:

[issue1814] Victor Stinner's GMP patch for longs

2008-11-03 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: I updated my patch against Python3 trunk. I fixed my patch to pass most long and struct tests: - fix byte array import/export - check for overflow - compute exponent in conversion to a float (use PyLong_SHIFT=1) - fix formating to support

[issue1814] Victor Stinner's GMP patch for longs

2008-01-13 Thread Guido van Rossum
Guido van Rossum added the comment: I don't recall, but I suppose it had stopped working and nobody could be found who wanted to maintain it. Possibly the Python-unfriendly license was also a reason. __ Tracker <[EMAIL PROTECTED]>

[issue1814] Victor Stinner's GMP patch for longs

2008-01-13 Thread Christian Heimes
Christian Heimes added the comment: Why was the mpz module removed from Python 2.4 in the first place? 2.3 has it. I see three way to implement the option: * Let somebody implement a mpz type as a 3rd party extension. * Let somebody implement a mpt type and ship it with the Python core * Le

[issue1814] Victor Stinner's GMP patch for longs

2008-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: Since this keeps coming up, I think it would make sense to turn this into an optional extension module. PS. The licensing concerns are another reason not to use this for the core long (or int in Py3k) type. -- keywords: +patch nosy: +gvanrossum priori

[issue1814] Victor Stinner's GMP patch for longs

2008-01-12 Thread Christian Heimes
New submission from Christian Heimes: A while ago Victor Stinner has spend several weeks in porting PyLongs to GMP: http://mail.python.org/pipermail/python-3000/2007-September/010718.html http://mail.python.org/pipermail/python-3000/2007-October/010755.html Although his patch didn't give the sp