[PATCH] D42740: Implement a case-folding version of DJB hash
Pavel Labath via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 8 10:00:10 PST 2018
labath added inline comments.
================
Comment at: lib/Support/UnicodeCaseFold.cpp:26
+ return C + 32;
+ // 24 characters
+ if (C >= 0x0100 && C <= 0x012e)
----------------
joerg wrote:
> Given that this should be applied to symbol names a lot, I would explicitly make the ASCII range fully covered to avoid all the other branches from getting triggered.
There's a fast path in `caseFoldingDjbHash` for 7-bit ascii which should cover all reasonable symbol names. That will short circuit the case folding before even this function gets invoked (skipping all utf8 decode-recode logic, etc). Is that what you were looking for?
Repository:
rL LLVM
https://reviews.llvm.org/D42740
More information about the llvm-commits
mailing list