INADA Naoki added the comment: Current compact ordered dict implementation is bit different from yours. When there was removed item, there are NULL entries in ma_entries, instead of swapping last item and deleted item. It's important to keep insertion order.
But it's easy to detect clean dict. Your suggestion can be used when: * dk_lookup == lookdict_unicode_nodummy: There are no dummies, all keys are unicode, and no NULL entries. * ma_used == dk_nentries: It means there are no NULL entries. (All deletion except .popitem() is allowed) I think dictresize for split table can be split function. But I don't know it can improve performance or readability. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28199> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com