Paul Rubin, 23.03.2010 06:05:
Antoine Pitrou writes:
"Orders of magnitude worse", in any case, sounds very exaggerated.

The worst case can lose orders of magnitude if a lot of values hash
to the same bucket.

While this is theoretically true, and it's good to be aware of this possibility, common string hash functions make it so rare in practice that a hash table will almost always outperform a trie for exact lookups. If it happens, it will either show up clearly enough in benchmarks or not be worth bothering.

Stefan

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to