Jeethu Rao <jee...@jeethurao.com> added the comment:

I tried it with a couple of different thresholds, twice each, ignoring the 
results of the first run. 16 seems to be the sweet spot.

THRESHOLD = 0
jeethu@dev:cpython  (3.7_list_insert_memmove)$ ./python -m timeit -s "l = []" 
"for _ in range(100): l.insert(0, None)"
500 loops, best of 5: 787 usec per loop

THRESHOLD = 4
jeethu@dev:cpython  (3.7_list_insert_memmove)$ ./python -m timeit -s "l = []" 
"for _ in range(100): l.insert(0, None)"
500 loops, best of 5: 781 usec per loop

THRESHOLD = 8
jeethu@dev:cpython  (3.7_list_insert_memmove)$ ./python -m timeit -s "l = []" 
"for _ in range(100): l.insert(0, None)"
500 loops, best of 5: 780 usec per loop

THRESHOLD = 16
jeethu@dev:cpython  (3.7_list_insert_memmove)$ ./python -m timeit -s "l = []" 
"for _ in range(100): l.insert(0, None)"
500 loops, best of 5: 758 usec per loop

THRESHOLD = 32
jeethu@dev:cpython  (3.7_list_insert_memmove)$ ./python -m timeit -s "l = []" 
"for _ in range(100): l.insert(0, None)"
500 loops, best of 5: 764 usec per loop

----------

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

Reply via email to