Message370070
Right; the naive algorithm for converting the internal binary representation to the decimal representation is quadratic time. In *theory* we could implement a subquadratic time algorithm, but the complexity of such an implementation outweighs the benefits. Python really isn't targeted at super-fast million-digit arithmetic; that's more the domain of libraries like GMP.
Closing as "won't fix". I'd recommend using gmpy2[1] instead. Alternatively, you may be able to make the `Decimal` type work with a suitably huge precision.
Related: #26256.
[1] gmpy2: https://gmpy2.readthedocs.io/en/latest/intro.html |
|
Date |
User |
Action |
Args |
2020-05-27 12:31:43 | mark.dickinson | set | recipients:
+ mark.dickinson, serhiy.storchaka, U.W. |
2020-05-27 12:31:43 | mark.dickinson | set | messageid: <1590582703.27.0.646175902423.issue40793@roundup.psfhosted.org> |
2020-05-27 12:31:43 | mark.dickinson | link | issue40793 messages |
2020-05-27 12:31:43 | mark.dickinson | create | |
|