[issue30224] remove outdated checks in struct
Serhiy Storchaka
report at bugs.python.org
Tue May 2 10:18:06 EDT 2017
Serhiy Storchaka added the comment:
I see a tiny 3% regression.
$ ./python -m timeit -s 'import struct; u = struct.Struct("100000Q").unpack; b = b"abcd\0\0\0\0"*100000' 'u(b)'
Unpatched: 50 loops, best of 5: 9.34 msec per loop
Patched: 50 loops, best of 5: 9.66 msec per loop
$ ./python -m timeit -s 'import struct; u = struct.Struct("<100000Q").unpack; b = b"abcd\0\0\0\0"*100000' 'u(b)'
Unpatched: 50 loops, best of 5: 9.37 msec per loop
Patched: 50 loops, best of 5: 9.71 msec per loop
$ ./python -m timeit -s 'import struct; u = struct.Struct(">100000Q").unpack; b = b"\0\0\0\0dcba"*100000' 'u(b)'
Unpatched: 20 loops, best of 5: 11.6 msec per loop
Patched: 20 loops, best of 5: 12 msec per loop
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30224>
_______________________________________
More information about the Python-bugs-list
mailing list