tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Perfect hash function generator



Joerg Sonnenberger wrote:
> The second part is the provided minimal perfect hash function generator.
> The generated hash function is very simple, using two lookups, a Jenkins
> hash and three unsigned constant divisions. Space usage is
> c * n * ld n * x Bytes with:
>       n = number of keys
>       c >= 2
>       x = 1 for cn < 256,
>       x = 2 for 256 <= cn < 65536,
>       x = 4 otherwise
> The process itself is propabilistic and generally quite fast. To process all
> non-comment lines of /etc/services on my laptop, it needs around 6s.

Is it one of the algorithms from cmph.sf.net or some other algorithm?

Alex


Home | Main Index | Thread Index | Old Index