Francesc Altet <[EMAIL PROTECTED]> writes: > I don't know exactly why do you need a dictionary for keeping the > data, but in case you want ultra-fast access to values, there is no > replacement for keeping a sorted list of keys and a list with the > original indices to values, and the proper list of values. Then, to > access a value, you only have to do a binary search on the sorted > list, another lookup in the original indices list and then go > straight to the value in the value list.
Actually, dictionary lookup is faster than binary search because it doesn't need to search through the table at all, it simply pinpoints the value (most of the time). -- http://mail.python.org/mailman/listinfo/python-list