Dennis Sweeney <sweeney.dennis...@gmail.com> added the comment:

========== 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

----------
type:  -> performance

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40313>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to