INADA Naoki added the comment: 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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28509> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com