On Sat, Jan 14, 2012 at 3:29 AM, glen herrmannsfeldt
<g...@ugcs.caltech.edu> wrote:

> I usually use a hash table. Especially if speed is important.
>
> You could also do binary search, which will find the right entry
> with about log(n) comparisons.

Yeah, and I prefer to stop the earth rotation when I take a sun bath... ;-)

Re-reading, I see I confused you with "the right entry" where it
actually may be more than one so I have to walk the entire list. In
fact, each entry has up to 5 possible fields to check like this. In
this case the change frequency of the data is more than the reference
rate, so on average I would have to build the hash table or search
tree on each reference. And I don't really have a context where I
could keep it.

But if you have an efficient hash function handy for 200 strings of
6-8 (uppercase) characters, I'm game. My ad-hoc tests were a bit
disappointing in rehash.

Rob

Reply via email to