Re:Perfect Hashes and faster than memcmp
by fake-name on Thursday March 19, 2015 @12:03AM
(#9230135)
For the love of FSM, please don't call your library "phash". "phash" is already in wide use for "perceptual hash", or the hashing mechanisms used for things like fuzzy image searching.
[ Parent
| on HN ]
Oh, I am on HN :)
Okay, point taken. I didn't know about this name. "pperf" maybe then. Note that this is still work in progress, I just had to finish another project, and will come back to this one soon.
EDIT: I've renamed the frontend to "pperf" now https://github.com/rurban/Perfect-Hash/commit/b475886f37d9
But the memcmp trick with unrolling of the comparisons beforehand for constant keys is already usable, and I believe someone already considered that optimization for gcc and llvm. If I remember I even saw a patch already. It should be used for switch statements with constant keys.