This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: 'str(long)' can be made faster
Type: performance Stage:
Components: Versions: Python 3.4
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: arigo, mark.dickinson, serhiy.storchaka
Priority: normal Keywords:

Created on 2013-05-31 09:49 by arigo, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg190397 - (view) Author: Armin Rigo (arigo) * (Python committer) Date: 2013-05-31 09:49
If you have in x some very large number, like 3**200000, then the computation for 'str(x)' is sub-efficient.  Nathan Hurst posted to the pypy-dev mailing list a pure Python algo that gives the same result in 2/3rd of the time (in either CPython or PyPy).  We would get a similar gain by recoding this algorithm in C.

The mail is here:
msg190398 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-05-31 10:06
See also issue3451.
msg190406 - (view) Author: Armin Rigo (arigo) * (Python committer) Date: 2013-05-31 14:21
Thanks, I missed it.  Sorry for the noise.
Date User Action Args
2022-04-11 14:57:46adminsetgithub: 62307
2013-05-31 14:21:29arigosetstatus: open -> closed
resolution: duplicate
messages: + msg190406
2013-05-31 10:06:30serhiy.storchakasetnosy: + mark.dickinson, serhiy.storchaka

messages: + msg190398
versions: + Python 3.4
2013-05-31 09:49:53arigocreate