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

Luboš Luňák via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 29 08:41:38 PDT 2022


llunak added a comment.

In D122974#3482556 <https://reviews.llvm.org/D122974#3482556>, @labath wrote:

> Interesting. I don't know if I missed this somewhere, but could explain what kind of a map operation can lldb perform without computing the hash at least once?

All of them :). Computing is not the only way of obtaining the hash of a string. LLDB index cache (settings set symbols.enable-lldb-index-cache true) stores a big bunch of strings and when loading them back into ConstString the next time djbHash() is ~15% of total CPU LLDB startup time. That could be saved if the cache cached the hash values too.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122974



More information about the lldb-commits mailing list