Just implement a hashtable. I can even send you a quadratic probing one I have in my bag-o-tricks.
Don't remember the runtime off the top of my head, but its O(log N) average, and O(N) worst case I believe. david -----Original Message----- From: botman [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 07, 2002 7:30 AM To: [EMAIL PROTECTED] Subject: Re: [hlcoders] string to #define > That still does a O(n) search with string compares. > > The one I'm dreaming of is different. > If you want fast string table lookups, might I suggest a Trie (i.e. a tree where each node has 26 children for each letter A-Z)... http://www.mmi.ee/~enn/node38.html ...but it really seems like overkill for such a simple problem. Jeffrey "botman" Broome _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

