This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author methane
Recipients Mark.Shannon, jdemeyer, methane, 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:13methanesetrecipients: + methane, Mark.Shannon, jdemeyer, miss-islington
2019-09-12 11:48:13methanesetmessageid: <1568288893.26.0.441205689079.issue37207@roundup.psfhosted.org>
2019-09-12 11:48:13methanelinkissue37207 messages
2019-09-12 11:48:13methanecreate