Марк Коренберг <socketp...@gmail.com> added the comment:
Original (not patched) python: ``` In [1]s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) In [2]: s.bind(('ff02::1de:c0db', 1234, 0, 2)) In [3]: timeit s.getsockname() The slowest run took 12.06 times longer than the fastest. This could mean that an intermediate result is being cached. 100000 loops, best of 3: 3.8 µs per loop In [5]: d = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) In [6]: d.bind(('::', 1235, 0, 0)) In [7]: timeit d.getsockname() The slowest run took 23.18 times longer than the fastest. This could mean that an intermediate result is being cached. 1000000 loops, best of 3: 532 ns per loop ``` On patched version, times for both cases should be the same exactly (i.e. 532 ns) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32221> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com