[PATCH] D122974: prevent ConstString from calling djbHash() more than once

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 4 06:40:41 PDT 2022


labath added subscribers: dblaikie, labath.
labath added a reviewer: dblaikie.
labath added a comment.

In principle, I like this a lot, though I'm not sure if this is the best way to integrate with with the StringMap class. Adding @dblaikie for thoughts on that.

Some background:
LLDB uses a string pool, and during (parallel) dwarf indexing, this string pool is the biggest bottleneck. To reduce contention, lldb actually uses a set of string pools, where it first computes a hash of the string (I believe this is the one-byte hash that Jonas is referring to) to determine which pool (and which mutex) to use, and then performs the actual container operation. This approach has resulted in considerable speedup, but it means the string is getting hashed more than once. Luboš is trying to remove the redundant hashes and speed it up even further.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122974/new/

https://reviews.llvm.org/D122974



More information about the llvm-commits mailing list