In message <[EMAIL PROTECTED]>, Bakul Shah writes:
>This caught my eye:
>
>>                                 Besides, there is no such thing as a
>>     perfect hash ... at least not one that has a small enough index range
>>     to be useful in a table lookup.
>
>If you can get to old CACMs see `Minimal Perfect Hash Functions Made Simple'
>by Richard J. Cichelli, Comm. of ACM, Jan 1980.  AFAIK gperf uses some
>variation of that algorithm and may have some details.  A minimal perfect hash
>function is only worth it (IMHO) when the set of input keys is mostly fixed and
>the hash function is used many many times (e.g. programming language keywords).

And even then it's seldom worth it according to the people behind the LCC
compiler...

--
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to