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, josh.r, louielu, methane, r.david.murray, rhettinger, serhiy.storchaka, tim.peters, xiang.zhang
Date 2019-03-12.17:10:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1552410625.16.0.646716778557.issue30040@roundup.psfhosted.org>
In-reply-to
Content
Another micro benchmark:

$ ./py.edict.opt -m perf timeit --compare-to ./py.master.opt '{}' --duplicate=10
py.master.opt: ..................... 26.3 ns +- 0.5 ns
py.edict.opt: ..................... 13.0 ns +- 0.1 ns

Mean +- std dev: [py.master.opt] 26.3 ns +- 0.5 ns -> [py.edict.opt] 13.0 ns +- 0.1 ns: 2.02x faster (-51%)

$ ./py.edict.opt -m perf timeit --compare-to ./py.master.opt 'd={}; d["a"]=None' --duplicate=10
py.master.opt: ..................... 58.1 ns +- 0.9 ns
py.edict.opt: ..................... 64.1 ns +- 0.9 ns

Mean +- std dev: [py.master.opt] 58.1 ns +- 0.9 ns -> [py.edict.opt] 64.1 ns +- 0.9 ns: 1.10x slower (+10%)


Hmm, while 2x faster temporal empty dict is nice, 10% slower case can be mitigated.
I will try more micro benchmarks and optimizations.
History
Date User Action Args
2019-03-12 17:10:25methanesetrecipients: + methane, tim.peters, rhettinger, r.david.murray, Mark.Shannon, serhiy.storchaka, josh.r, xiang.zhang, louielu
2019-03-12 17:10:25methanesetmessageid: <1552410625.16.0.646716778557.issue30040@roundup.psfhosted.org>
2019-03-12 17:10:25methanelinkissue30040 messages
2019-03-12 17:10:25methanecreate