Author Mark.Shannon
Recipients Mark.Shannon, inada.naoki, josh.r, louielu, r.david.murray, rhettinger, serhiy.storchaka, tim.peters, vstinner, xiang.zhang
Date 2019-03-12.20:11:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1552421502.56.0.499534424393.issue30040@roundup.psfhosted.org>
In-reply-to
Content
In general, I agree with Raymond that this is likely to counter-productive.

But let's not guess, let's measure :)

I expect that there are few live empty dicts at any time for most programs. In which case there is no point in any change that attempts to save memory use for empty dicts.

But I could be wrong. If there commonly are lots of live empty dicts,
then some sort of optimisation could be appropriate.


I should also add that dict.clear() uses a key-sharing dict to avoid allocation, because PyDict_Clear() is a void function so there is no way to handle an allocation failure.
History
Date User Action Args
2019-03-12 20:11:42Mark.Shannonsetrecipients: + Mark.Shannon, tim.peters, rhettinger, vstinner, r.david.murray, inada.naoki, serhiy.storchaka, josh.r, xiang.zhang, louielu
2019-03-12 20:11:42Mark.Shannonsetmessageid: <1552421502.56.0.499534424393.issue30040@roundup.psfhosted.org>
2019-03-12 20:11:42Mark.Shannonlinkissue30040 messages
2019-03-12 20:11:42Mark.Shannoncreate