[issue40793] print() performance problem with very large numbers

2020-06-02 Thread U.W.
U.W. added the comment: Well, the number in itself is not so useful, but... - I encountered a performance problem in Python where I did not expect one - Other people will encounter that, too, and now they easily find the reason behind it (I would not have opened this bug if I had found an exp

[issue40793] print() performance problem with very large numbers

2020-05-29 Thread Mark Dickinson
Mark Dickinson added the comment: > FYI, printing this 60 Million digit number took about 12 hours on my i7. That sounds about right: on my machine, it takes around 10 seconds to convert a 1 million-digit number to a string. Multiplying by 60**2 gives 10 hours. I do have to wonder what you'r

[issue40793] print() performance problem with very large numbers

2020-05-29 Thread U.W.
U.W. added the comment: That's ok for me. It *is* a rare edge case. FYI, printing this 60 Million digit number took about 12 hours on my i7. -- ___ Python tracker ___ ___

[issue40793] print() performance problem with very large numbers

2020-05-27 Thread Mark Dickinson
Mark Dickinson added the comment: 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. P

[issue40793] print() performance problem with very large numbers

2020-05-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is not a print() problem, it is a problem with converting an integer to decimal string representation. AFAIK it has quadratic complexity from the size of the integer. -- nosy: +mark.dickinson, serhiy.storchaka __

[issue40793] print() performance problem with very large numbers

2020-05-27 Thread U.W.
New submission from U.W. : Printing very large numbers takes forever. Example: print((2**24)**(3840*2160)) That number has about 60 Million digits and my machine is busy now for more than an hour and still not finished. The calculation of the number is no problem, btw. and finishes in under