[llvm-dev] RFC: Improving performance of HashString

Davide Italiano via llvm-dev llvm-dev at lists.llvm.org
Tue Apr 25 13:11:14 PDT 2017


On Tue, Apr 25, 2017 at 12:55 PM, Vedant Kumar via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
>
>> On Apr 24, 2017, at 5:37 PM, Scott Smith via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>>
>> I've been working on improving the startup performance of lldb, and ran into an issue with llvm::HashString.  It works a character at a time, which creates a long dependency chain in the processor.  On the other hand, the function is very short, which probably works well for short identifiers.
>>
>> I don't know how the mix of identifier length seen by lldb compares with that seen by llvm/clang; I imagine they're pretty similar.
>>
>> I have to different proposals, and wanted to gauge which would be preferred:
>
>
>> 1. Use xxhash instead.
>

I'd lean towards this option as we already have a copy of xxHash in
lib/Support (llvm/Support/xxhash.h).
We use it for computing the --build-id in lld as fast/non-crytographic
hash variant and has proven to outperform other candidates (e.g.
CityHash).

Vedant, what do you mean with unsupported?

-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare


More information about the llvm-dev mailing list