[PATCH] D45571: [ELF] - Speedup MergeInputSection::splitStrings

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 12 13:45:38 PDT 2018


ruiu added inline comments.


================
Comment at: ELF/InputSection.cpp:867-868
+static uint64_t hashString(const char *Data, size_t Size) {
+  // Optimize for 1 byte strings case. For example, scylla has
+  // about 15k of one byte zeroes.
+  if (Size == 1)
----------------
This is interesting, but if this is effective, we should do that in StringRef::hash so that it speeds up everyone's code, shouldn't we?


https://reviews.llvm.org/D45571





More information about the llvm-commits mailing list