[PATCH] D45571: [ELF] - Speedup MergeInputSection::splitStrings
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 13 04:27:33 PDT 2018
grimar 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)
----------------
ruiu wrote:
> 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?
Hmm. I thought it has a minor but positive effect with this change.
But today I re-profiled exactly this place using more iterations and it seems it was a computation error.
So I removed this part.
https://reviews.llvm.org/D45571
More information about the llvm-commits
mailing list