Hash vs list
jeff at zingstudios.net
Mon Apr 24 16:03:39 MDT 2006
Thanks for the responses everyone. Some were more detailed than I
really needed but they gave me a lot of insight into how these sorts
of things work (and learning something new is always a good thing).
In the end I wrote some test programs and ran them against generated
data and the hashes won the speed test hands-down. 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) but it's clear the hash-key lookup is
vastly more efficient than iterating over a huge array.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 191 bytes
Desc: not available
Url : http://plug.org/pipermail/plug/attachments/20060424/91a5de2c/attachment.bin
More information about the PLUG