BSD license compatible hash algorithm?

Peter Jeremy peterjeremy at optushome.com.au
Sat Dec 29 13:35:25 PST 2007


On Sat, Dec 29, 2007 at 08:50:14PM +0000, Edward B. DREGER wrote:
>...have you explored [order-preserving] minimal perfect hash functions?
>
>perfect_hash = ( hash1[x] + hash2[x] ) % entry_count ;

This relies on pre-knowledge of all possible entries.  It's excellent for
(eg) keyword lookups in a compiler (and gcc uses gperf for that reason)
but no good where the input can be arbitrary.

-- 
Peter Jeremy
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20071229/1f10ae27/attachment.pgp


More information about the freebsd-hackers mailing list