Hash vs list

Levi Pearson levi at cold.org
Tue Apr 25 09:23:36 MDT 2006

On Apr 24, 2006, at 4:03 PM, Jeff Schroeder wrote:
> It seems a little
> odd to use a hash when all I really have is a huge set of "keys" (I  
> set
> the values to 1 arbitrarily)

Quite the contrary; when you have a large set of unordered keys and  
you need to look them up quickly (test for presence of a key), a hash  
table is a pretty good choice.  If you can impose some order on the  
keys, a lookup tree might also be a good choice, too.  But it doesn't  
sound like PHP gives you anything but hashes for free, so you might  
as well use a hash!


More information about the PLUG mailing list