[PATCH] D137601: Only hash the start of keys in StringMap
Erik Desjardins via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 8 16:08:23 PST 2022
erikdesjardins added a comment.
It may make sense to first/also switch to xxHash (already included here https://github.com/llvm/llvm-project/blob/295861514e0d1e48df2918b630dd692ac27ee0de/llvm/include/llvm/Support/xxhash.h#L45), which should be much faster than DJB, especially for large keys.
OTOH, it appears that some tests depend on `StringMap` iteration order, so updating them as a result of changing the hash function may be painful. For example, https://reviews.llvm.org/D97396 (which attempted to change the seed value) was reverted for that reason.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137601/new/
https://reviews.llvm.org/D137601
More information about the llvm-commits
mailing list