lua-users home
lua-l archive

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


On Mon, Oct 13, 2008 at 9:00 AM, Klaus Ripke <paul-lua@malete.org> wrote:
> For faster run-time access use a mmap-based implementation
> (ask me for one or roll your own, the structure is dead simple
> http://cr.yp.to/cdb/cdb.txt), which should almost be on par
> with other internal structures and the Lua hash.
> Especially for a large DB with a small number of lookups it has the big
> advantage of examining only a small number of memory/file locations.

tinycdb[1] is a public domain implementation which uses mmap. I have
published lua-tinycdb[2], which is a lua binding to the tinycdb
library including the tinycdb sources for convenience. If you have
luarocks, `luarocks install lua-tinycdb` should be all you need (on
*nix platforms). Unfortunately, DJB does not seem to have released his
cdb implementation into the public domain as he has with most of his
other projects.

[1]: http://www.corpit.ru/mjt/tinycdb.html
[2]: http://asbradbury.org/projects/lua-tinycdb/

Alex