Message 309810 - Python tracker

Message309810

Author jeethu
Recipients jeethu, serhiy.storchaka
Date 2018-01-11.14:40:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1515681600.47.0.467229070634.issue32534@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2018-01-11 14:40:00jeethusetrecipients: + jeethu, serhiy.storchaka
2018-01-11 14:40:00jeethusetmessageid: <1515681600.47.0.467229070634.issue32534@psf.upfronthosting.co.za>
2018-01-11 14:40:00jeethulinkissue32534 messages
2018-01-11 14:40:00jeethucreate