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, benjamin.peterson, methane, rhettinger, serhiy.storchaka
Date 2016-10-23.02:41:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAEfz+Twzs_6f7FbT_9y9_j4U2PotPurw6_VSWzHZ4xp=88=kyQ@mail.gmail.com>
In-reply-to <CAEfz+Tya7COaYGobYteNsBstbOw0N4Yv8jJXwP1erR__Zy=05w@mail.gmail.com>
Content
And I feel current target size of dict_merge is bit larger.

When inserting new item:

* ma_used = dk_size*2 / 3 when right before increasing keys
* ma_used = dk_size    / 3 when right after increasing keys

On the other hand, current dict_merge creates:

* ma_used = dk_size / 2 when all keys in two dict is distinct
* ma_used = dk_size / 4 when all keys in two dict is same

If changing it to dictresize(mp, (mp->ma_used + other->ma_used)*3/2),

* ma_used = dk_size*2 / 3 when all keys in two dict is distinct
* ma_used = dk_size    / 3 when all keys in two dict is same

I think this is more consistent.
History
Date User Action Args
2016-10-23 02:41:31methanesetrecipients: + methane, rhettinger, benjamin.peterson, Mark.Shannon, serhiy.storchaka
2016-10-23 02:41:31methanelinkissue28509 messages
2016-10-23 02:41:30methanecreate