[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

Stefan Krah report at bugs.python.org
Fri Feb 7 10:19:28 EST 2020


Stefan Krah <stefan at bytereef.org> added the comment:

With _pydecimal the memory also grows very slowly (I didn't have the patience 
to wait for MemoryError).

I'm pretty sure decNumber also does the same, it's just easier to implement 
and does not slow down division for small numbers.

libmpdec always favors precisions from roughly 9-34 digits whenever 
there's a potential performance issue.

The only thing I could imagine is to special-case, say, prec > 10000.

----------
nosy: +skrah

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


More information about the Python-bugs-list mailing list