Xiang Zhang added the comment:

The test on my box is reverse and stable, python3 is unpatched and python is 
patched. Anyway, it can't be called significant.

 ./python3 -m perf timeit --compare-to /home/angwer/repos/cpython/python -s 
'import struct; u = struct.Struct("100000Q").unpack; 
b=b"abcd\x00\x00\x00\x00"*100000' 'u(b)'
python: ..................... 2.96 ms +- 0.05 ms
python3: ..................... 3.13 ms +- 0.03 ms

Median +- std dev: [python] 2.96 ms +- 0.05 ms -> [python3] 3.13 ms +- 0.03 ms: 
1.06x slower

./python3 -m perf timeit --compare-to /home/angwer/repos/cpython/python -s 
'import struct; u = struct.Struct("<100000Q").unpack; 
b=b"abcd\x00\x00\x00\x00"*100000' 'u(b)'
python: ..................... 2.96 ms +- 0.05 ms
python3: ..................... 3.13 ms +- 0.14 ms

Median +- std dev: [python] 2.96 ms +- 0.05 ms -> [python3] 3.13 ms +- 0.14 ms: 
1.06x slower

./python3 -m perf timeit --compare-to /home/angwer/repos/cpython/python -s 
'import struct; u = struct.Struct(">100000Q").unpack; 
b=b"\x00\x00\x00\x00dcba"*100000' 'u(b)'
python: ..................... 3.51 ms +- 0.09 ms
python3: ..................... 3.67 ms +- 0.06 ms

Median +- std dev: [python] 3.51 ms +- 0.09 ms -> [python3] 3.67 ms +- 0.06 ms: 
1.05x slower

----------

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

Reply via email to