Martin v. Löwis <mar...@v.loewis.de> added the comment: > But then isn't it vulnerable to Frank's first attack as exposed in > http://mail.python.org/pipermail/python-dev/2012-January/115726.html ?
It would be, yes. That's sad. That could be fixed by indeed creating trees in all cases (i.e. moving away from open addressing altogether). The memory consumption does not worry me here; however, dictionary order will change in more cases. Compatibility could be restored by introducing a threshold for tree creation: if insertion visits more than N slots, go back to the original slot and put a tree there. I'd expect that N could be small, e.g. N==4. Lookup would then have to consider all AVL trees along the chain of visited slots, but ISTM it could also stop after visiting N slots. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13703> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com