tech-userlevel archive

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

Re: RFC: Constant Database Support

In article <>,
Joerg Sonnenberger  <> wrote:
>Hi all,
>attached is an implement of a constant database based on a minimal
>perfect hash table. This is a very compact read-only database. Two
>special design constraint is that more than one key can exist for a
>value and that the key itself is not stored by the database. Most users
>already do that one way or the other in the data, so it is just
>redundant and with a proper content format not even cheaper.
>A patch to modify services_mkdb for using the new format is attached as
>well to demonstrate the size difference. For this use case, the
>database size drops from 2.1MB (disk space, 4.2MB file size) to 320KB
>(disk space, 306KB file size). Creation time drops from 1.9s to 0.23s
>on AMD64.
>I would like to integrate this into libc for the various purposes at

Looks great! Doesn't asprintf() leak memory though?


Home | Main Index | Thread Index | Old Index