On Wed, Jan 13, 2016 at 4:50 PM, Cem Karan <cfkar...@gmail.com> wrote: > > Is that so? I'll be honest, I never tested its asymptotic performance, I > just assumed that he had a dict coupled with a heap somehow, but I never > looked into the code. >
I have just tested the code, the aymptotic performance is O(log(n)) for all operations. Infact the code is very simple to understand, technically the heapdict class is composed of a dict and heap, each element of heap is a mutable list and dict stores references to that mutable list, so that a specific element can be deleted in O(log(n)) -- https://mail.python.org/mailman/listinfo/python-list