[issue3451] Asymptotically faster divmod and str(long)

STINNER Victor report at bugs.python.org
Tue Apr 13 11:47:42 EDT 2021


STINNER Victor <vstinner at python.org> added the comment:

Python has a reasonable efficiency up to 1000 decimal digits (according to benchmark) which is already really great! Operations with more than 1000 decimal digits is an uncommon. IMO you should use a dedicated library like GMP for that.

I would prefer to keep CPython code simple enough to maintain. Objects/longobject.c is already 5744 lines of C code. longformat_BZ.diff adds around 700 lines of code, but it only makes str(int) starting at 2000 decimal digits.

Yeah, we could do better for integers with <many digits>, but I would prefer not to :-) Python has a limited number of volunteers working on it, and it's not specialized in numbers. We should keep the maintenance burden at an acceptable level ;-)

----------
resolution:  -> wont fix
stage: patch review -> resolved
status: languishing -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue3451>
_______________________________________


More information about the Python-bugs-list mailing list