Author serhiy.storchaka
Recipients inada.naoki, r.david.murray, serhiy.storchaka, xiang.zhang
Date 2017-04-14.19:41:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1492198908.13.0.340291759361.issue30040@psf.upfronthosting.co.za>
In-reply-to
Content
I got following result:

$ ./python.patched -m perf timeit --compare-to=./python.default --duplicate=100 -- '{}'
python.default: ..................... 203 ns +- 5 ns
python.patched: ..................... 97.1 ns +- 0.7 ns

Mean +- std dev: [python.default] 203 ns +- 5 ns -> [python.patched] 97.1 ns +- 0.7 ns: 2.09x faster (-52%)

$ ./python.patched -m perf timeit --compare-to=./python.default --duplicate=100 -- 'x={}; x[1]=1'
python.default: ..................... 494 ns +- 5 ns
python.patched: ..................... 592 ns +- 7 ns

Mean +- std dev: [python.default] 494 ns +- 5 ns -> [python.patched] 592 ns +- 7 ns: 1.20x slower (+20%)

Seems something is wrong with resizing an empty dict. It shouldn't take such much time.
History
Date User Action Args
2017-04-14 19:41:48serhiy.storchakasetrecipients: + serhiy.storchaka, r.david.murray, inada.naoki, xiang.zhang
2017-04-14 19:41:48serhiy.storchakasetmessageid: <1492198908.13.0.340291759361.issue30040@psf.upfronthosting.co.za>
2017-04-14 19:41:48serhiy.storchakalinkissue30040 messages
2017-04-14 19:41:47serhiy.storchakacreate