3 ms·
Really good and well written article. We did the similar trick with SSE. It's a good approach if a kind of non-portable hash can be used. In system I'm working
by wmu 10y ago
Really good and well written article.
We did the similar trick with SSE. It's a good approach if a kind of non-portable hash can be used. In system I'm working on we introduced two APIs: hash() which maps to "fastest hash we have on this machine" and portable_hash() that's a predefined hash algorithm.
BTW, SSE4 introduced carry-less multiplication which can also be used to boost hashing[1]. However, it's good for large data; in our tests it outperformed other algorithms for inputs larger than 1kB.
[1] https://github.com/lemire/StronglyUniversalStringHashing https://github.com/lemire/StronglyUniversalStringHashing