phf
phf copied to clipboard
Tiny perfect hash library for C, C++, and Lua
Need to provide interface for storing and restoring (aka exporting and importing) the generated hash function. Applications must currently do this on their own.
I use c++ and the phf struct, in my program, I use phf multiple times to generate minimal functions for different arrays. However, there exist duplicate keys in the generated...
Support optional time limit on function generation. Although CHD can complete in bounded time (at least given a uniformly random hashing primitive), most applications really only care about constraining actual...
To implement modular reduction, a faster alternative to a division is to use a multiplication and a shift, as explained by Lemire in https://lemire.me/blog/2016/06/27/a-fast-alternative-to-the-modulo-reduction/. This patch seems to work: ```patch...