Autocomplete of entire Linux kernel using Redis's new ZRANGEBYLEX
autocomplete.redis.io
autocomplete.redis.io
I just tested a binary search of 8 million random 100 byte DNA strings written in Go. 10,000 requests for autocompletions of random 5 byte prefixes yielded 78 million results in 38 milliseconds. And this is with the strings dotted around in memory after sorting them. Further optimizations are possible, but if they were hoping to prove some kind of performance benchmark with this, they have failed.
However I'd also be interested to see that code, if it's open source. I've been spending lots of time with Go lately. :)
The point of Redis sorted sets is that inserting is cheap and as soon as you insert the query operations see the new data modified as needed without any slowdown, and this requires a tree-like structure for this exact use case (it is actually more complex than this and sorted sets are implemented with a skip list + hash table).
What is interesting of having this in Redis is that you have the same operation into a networked fast in-memory DB, so your clients can mount something requiring range queries now.
For instance you can use a sorted set where you increment the score of every search query you see, and another sorted set where the N-top items are inserted to autocomplete searches using the new ZRANGEBYLEX command. However because you have multiple keys and memory-wise this is pretty efficient, you can segment your users in different categories and do this in a per-category basis so that different categories will have different autocompletion dictionaries, that may better fit what they are looking for.