[issue28509] dict.update allocates too much

Serhiy Storchaka report at bugs.python.org
Sun Oct 23 03:15:54 EDT 2016


Serhiy Storchaka added the comment:

> Dict is resized. And since __dict__.update() caused the resizing,
both are normal (combined) dict.

Ah, my bad, I missed this point. The original issue now disappears. Thanks Naoki.

But dict.update (and maybe inserting) can use more economical allocation strategy.

----------
stage:  -> needs patch
title: Key-sharing dictionaries can inrease the memory consumption -> dict.update allocates too much
versions: +Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28509>
_______________________________________


More information about the Python-bugs-list mailing list