Author inada.naoki
Recipients Mark.Shannon, inada.naoki, jdemeyer, miss-islington
Date 2019-09-12.11:48:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568288893.26.0.441205689079.issue37207@roundup.psfhosted.org>
In-reply-to
Content
$ ./python -m pyperf timeit --compare-to ./python-master 'dict()'
python-master: ..................... 89.9 ns +- 1.2 ns
python: ..................... 72.5 ns +- 1.6 ns

Mean +- std dev: [python-master] 89.9 ns +- 1.2 ns -> [python] 72.5 ns +- 1.6 ns: 1.24x faster (-19%)

$ ./python -m pyperf timeit --compare-to ./python-master -s 'import string; a=dict.fromkeys(string.ascii_lowercase); b=dict.fromkeys(string.ascii_uppercase)' -- 'dict(a, **b)'
python-master: ..................... 1.41 us +- 0.04 us
python: ..................... 1.53 us +- 0.04 us

Mean +- std dev: [python-master] 1.41 us +- 0.04 us -> [python] 1.53 us +- 0.04 us: 1.09x slower (+9%)

---

There is some overhead in old dict merging idiom.  But it seems reasonable compared to the benefit. LGTM.
History
Date User Action Args
2019-09-12 11:48:13inada.naokisetrecipients: + inada.naoki, Mark.Shannon, jdemeyer, miss-islington
2019-09-12 11:48:13inada.naokisetmessageid: <1568288893.26.0.441205689079.issue37207@roundup.psfhosted.org>
2019-09-12 11:48:13inada.naokilinkissue37207 messages
2019-09-12 11:48:13inada.naokicreate