BBHash
BBHash copied to clipboard
Avoid copy constructor
First thanks for this great stuff! Lookup can be 3x faster on strings with the following changes: uint64_t lookup(const elem_t &elem) uint64_t getLevel(hash_pair_t & bbhash,const elem_t &val,int * res_level, int maxlevel = 100, int minlevel =0)
looks good, thanks! I applied the fix on master branch and alltypes branch. Tests pass.
I do see a speed improvement in the alltypes branch: before:
$ ./example_custom_hash_strings 2000000 1
Query of 2000000 key in 0.27s
after:
Query of 2000000 key in 0.18s
The 3x speed increase I have is because I use Aquahash for hashing (https://github.com/jandrewrogers/AquaHash) and string_views instead of string (c++17). Using AES CPU instructions speed hashing a lot.
neat