[libc-commits] [PATCH] D136487: [libc.search] [PATCH 1/6] add wyhash as a header library

Schrodinger ZHU Yifan via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Dec 16 11:39:47 PST 2022


SchrodingerZhu added a comment.

Hi,
I would like to share some ideas about the maintenance:

- Since the property of this Wyhash implementation is proved by both SMHasher and the provided tests, we can keep the it unchanged, unless:
- "security issue" is confirmed for this implementation such as one can prove that particular sequence of hashing leads to heavy collisions
- or, new hash implementation is highly promising in performance and robustness

Although wyhash is also stable across micro-architectures as it does not use platform-specific instructions and it take care of the endianness, currently this hash function is only intended to be used in in-memory hashmap that only relies on the stability of hash value (given a fixed seed) at runtime.

If runtime stability is all we required, I think there should be no bit concern for updating the hash implementation or even changing the algorithm if ever needed in the future.

Best,
Yifan


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136487/new/

https://reviews.llvm.org/D136487



More information about the libc-commits mailing list