Hacker News new | ask | show | jobs
by DAllison 3526 days ago
> Exact lookup in the trie is O(string_length), like a hash table

It's worth noting that some standard libraries (Java's JDK for one [1]) will cache the value of String.GetHashCode(), meaning string lookup in a HashTable is constant time average (but O(n) worst-case due to collisions).

[1]: http://mindprod.com/jgloss/hashcode.html