Author socketpair
Recipients pitrou, socketpair
Date 2017-12-20.11:34:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513769687.65.0.213398074469.issue32221@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2017-12-20 11:34:47socketpairsetrecipients: + socketpair, pitrou
2017-12-20 11:34:47socketpairsetmessageid: <1513769687.65.0.213398074469.issue32221@psf.upfronthosting.co.za>
2017-12-20 11:34:47socketpairlinkissue32221 messages
2017-12-20 11:34:47socketpaircreate