New submission from Inada Naoki <songofaca...@gmail.com>:
PyDict_DelItem stores DUMMY entry in the hash table. Without DUMMY, collision chain will be broken so proving will be not working. But `dict.popitem()` returns the last item in the insertion order. The item must be the last item of collision chain too. So `dict.popitem()` can use EMPTY entry instead of DUMMY, and reduce dict resizing. ---------- components: Interpreter Core messages: 380022 nosy: methane priority: normal severity: normal status: open title: Optimize dict.popitem() & insert use case. versions: Python 3.10 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42216> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com