for an excellent example of a trie implementation, the haskell bytestring trie datastructure is really nice to look at. Its docs can be found at <a href="http://hackage.haskell.org/package/bytestring-trie" rel="nofollow">http://hackage.haskell.org/package/bytestring-trie</a> and the very readable sourcecode at <a href="http://hackage.haskell.org/packages/archive/bytestring-trie/0.2.2/doc/html/src/Data-Trie-Internal.html" rel="nofollow">http://hackage.haskell.org/packages/archive/bytestring-trie/...</a><p>edit: note that its not strictly a trie, but can be used as one, in general its more like it does a trie-like key value lookup.<p>edit: it is also worth noting that its pretty fast, counting reading data in from the file system and other overhead, loading 1.5 million key - value pairs of realworld production data into the trie, and then making my first query, in under 30 seconds. And thats without even doing the sort of preprocessing that can make it much much faster! (namely, lexigraphically sorting the strings I'm using as keys before doing the k-v insertions)