Hi,
I was happy to run into cmph, and using it worked like a charm (although the Python wrapper crashes on quite a few algorithms at the moment).
What I am left wondering is, if it is worthwhile generating minimal code for a given algorithm, specifically for the lookup functions? This could save a lot of space on embedded applications, especially if the load-factor covers empty entries with larger structures.
As a use case, I've created LillyDAP as a very small, parse-table-based LDAP engine; I used gperf because it generates code, but the outcome is far from minimal. I would have loved to have used cmph in its place.
I looked into your code, of course, but it is not trivial to me how to help myself in this respect. Hence the suggestion / feature request.
Thanks,
Rick van Rein
ARPA2.net / InternetWide.org
This has been done before: http://lua-gtk.luaforge.net/reference/modules/src/hash/hash-cmph-bdz.c.html, http://lua-gtk.luaforge.net/reference/modules/src/hash/hash-cmph-fch.c.html. You can just borrow the code from there.