[PATCH] D137601: Only hash the start of keys in StringMap

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 8 18:08:54 PST 2022


dblaikie added a comment.

Seems problematic if the strings happen to have common prefixes - not sure this is the right direction.

While it might be more work, might be worth considering changing hash function as @erikdesjardins mentioned, if considerations are made to help folks migrate/deal with the fallout of order changing (maybe even worth building in defensive features to reduce order dependence, like Abseil uses for its hash containers - though I'd have thought reverse iteration mode would've helped flush most of this out?)


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