Message288460
There is a XXX in v3.5.0 shows that need to dealing with deque maxlen setting case in deque_repeat.
Although there have common case for deque size 1 with maxlen, other size of deque with maxlen still using for-loop to extend the deque, without any detection.
Adding this fast break will reduce the execution speed when repeat deque with maxlen.
---
$ cat tests.py
from collections import deque
for _ in range(10:
d = deque(maxlen=100_000)
d.insert(0, 0)
d.insert(0, 10)
d * 10_000_000
$ time ./python_with_patch tests.py
$ time ./python tests.py |
|
Date |
User |
Action |
Args |
2017-02-23 16:39:23 | louielu | set | recipients:
+ louielu |
2017-02-23 16:39:23 | louielu | set | messageid: <1487867963.03.0.590116533592.issue29634@psf.upfronthosting.co.za> |
2017-02-23 16:39:22 | louielu | link | issue29634 messages |
2017-02-23 16:39:22 | louielu | create | |
|