3 ms·
I’d really like to see progress on hashes that fit into a few lines of code. It seems FNV-1a is still the best option in that regard.
by orasis 8y ago
I’d really like to see progress on hashes that fit into a few lines of code. It seems FNV-1a is still the best option in that regard.
- deleted 8y ago[deleted]
- bradleyjg 8y agoIf this is all there is to it: https://github.com/wangyi-fudan/wyhash/blob/master/wyhash.h https://github.com/wangyi-fudan/wyhash/blob/master/wyhash.h That doesn’t seem like much.
- haberman 8y agoAgreed, if that's the whole hash function I think small code size is a selling point of this hash compared with other modern fast hashes. This hash function looks like it will do unaligned reads if you're hashing an unaligned string. This doesn't matter on x86, but portable code should avoid this. It would be helpful to have a wrapper function that could handle unaligned strings by special-casing the begin and end of buffer.
- orasis 8y agoIt’s bigger than I’d want to include in JavaScript for a web page.