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.

Author Dennis Sweeney
Recipients Antony.Lee, Dennis Sweeney
Date 2020-04-19.09:25:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1587288345.43.0.352069548085.issue40313@roundup.psfhosted.org>
In-reply-to
Content
========== Master ==========

.\python.bat -m pyperf timeit -s "import random, math; data=random.getrandbits(8*10_000_000).to_bytes(10_000_000, 'big')" "temp = data.hex(); '\n'.join(temp[n:n+128] for n in range(0, len(temp), 128))"

Mean +- std dev: 74.3 ms +- 1.1 ms

.\python.bat -m pyperf timeit -s "import random; data=random.getrandbits(8*10_000_000).to_bytes(10_000_000, 'big')" "data.hex('\n', -64)"

Mean +- std dev: 44.0 ms +- 0.3 ms

========== PR 19594 ==========

.\python.bat -m pyperf timeit -s "import random, math; data=random.getrandbits(8*10_000_000).to_bytes(10_000_000, 'big')" "temp = data.hex(); '\n'.join(temp[n:n+128] for n in range(0, len(temp), 128))"

Mean +- std dev: 65.2 ms +- 0.6 ms

.\python.bat -m pyperf timeit -s "import random; data=random.getrandbits(8*10_000_000).to_bytes(10_000_000, 'big')" "data.hex('\n', -64)"

Mean +- std dev: 18.1 ms +- 0.1 ms
History
Date User Action Args
2020-04-19 09:25:45Dennis Sweeneysetrecipients: + Dennis Sweeney, Antony.Lee
2020-04-19 09:25:45Dennis Sweeneysetmessageid: <1587288345.43.0.352069548085.issue40313@roundup.psfhosted.org>
2020-04-19 09:25:45Dennis Sweeneylinkissue40313 messages
2020-04-19 09:25:44Dennis Sweeneycreate