Re: cdb Fast Lookup
Gustavo Vieira Gonçalves Coelho Rios <[email protected]> Fri, 23 Aug 2002 22:31:31 -0300
| Newsgroups | gmane.comp.djb.cdb |
|---|---|
| Organization | Alstom Transport Information Solution |
| Message-ID | <[email protected]> |
Steve Dekorte wrote: > > On Friday, August 23, 2002, at 05:00 PM, Russ Allbery wrote: > > How many keys are in the typical cdb database? Do you really think that > > number is large compared to the numbers represented by a 32-bit integer, > > for instance? > > No, but I don't think cdb uses 2^32 byte large db file. Remember, your > hash of a key is going to map to a position in a file where we should be > able to find the corresponding record. > > > A Google search for perfect hash functions turns up lots of details. > > I'll check them out. Interesting stuff. > > Cheers, > Steve I guess no one of you has gotten what i mean! If you have more than a register mapping to the same hash, you are in trouble!!!!! It won't be possible to direct access to the register. This will require you to probe for the correct slot! That's the problem!