tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Perfect hash function generator
On Wed, Jul 15, 2009 at 10:19:33PM +0100, Alexander Nasonov wrote:
> 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?
Yes, CHM. I plan to also provide CHD at some point, but that is in the
future. As CHD has the fastest result, it was the preference for the
first step.
Joerg
Home |
Main Index |
Thread Index |
Old Index