Skip to content

Use aHash instead of SipHasher and FNV

Yorick Peterse requested to merge ahash into master

aHash is supposed to be quite a bit faster than both, while still being DOS resistant. It also requires less memory compared to SipHasher: only 32 bytes instead of 72 bytes. This is important, because it ensures that all object values (ignoring any indirection they currently use) are either 8B, 24B, or 32B; previously the Hasher value would be the only one with a size of 72B. This simplifies future allocator changes, as there are fewer object sizes we'd have to deal with.

Since aHash does not support obtaining the keys used, resetting hashers is no longer possible; at least not without storing the keys ourselves. As this is not terribly useful in the first place (you can just create a new hasher), support for resetting hashers is removed.

This fixes #179 (closed)

Edited by Yorick Peterse

Merge request reports