Duncan Booth wrote: >> BTW why are python dicts implemented as hash tables and not judy >> arrays? >> > Probably because: > > Python predates judy arrays. > Nobody has proposed replacing the current dict implementation. > Nobody has demonstrated that it would actually be an advantage to > replace the current implementation. > Or maybe Python dicts are just more flexible?
Also, see http://www.dalkescientific.com/Python/PyJudy.html with the conclusions drawn on performance: > The first conclusion is that Python dictionaries are wicked fast. > There are few cases where PyJudy is faster, though perhaps there might > be a few more if I knew more about the Python extension API. Bear in > mind though that the Judy arrays are in sorted order and the JudyL* > classes have ways to access elements by order. So for a specialised use Judy arrays could be a good idea, but not as a general replacement for Python dicts. -- http://mail.python.org/mailman/listinfo/python-list