Aleksey Vaneev
Aleksey Vaneev
Hm. I honestly think that "hashing singularity" has been reached. We have bloated hashes like xxhash as well as more elegant hashes like ahash, wyhash and komihash. Math has objective...
Thanks. Didn't notice the char values are UTF-16.
The quality is fine. Komihash has 128-bit "state space", so collisions do not happen. Anyway, I've tested the approach in SMHasher without issues. You can optimize incremental hashing for char,...
Well, look at hash value as a "starting point". The next hashing round moves this "starting point" to another position. This may not work with other hashes, but it works...
Understood. Anyway, it looks cleaner that way I think.
Discrete-incremental approach is very useful for database hashing, not only because it is faster, but also because it implicitly separates the data items. For example, if you hash two string-pairs...
Yes, I understand. But the approach is not ideal, because length is a binary value and in some cases if you append an independent binary value after the string, a...
I think this leaves a chance to programming error. Beside that, appending string's length is an unnecessary overhead compared to discrete-incremental approach.
For nested structures, it will be enough to add zero-length hashing round `Hash = komihash( &tmp, 0, Hash );` for each nesting. It's a data-less round, and it's very fast,...
It should be more like `komihash