[clang] [clang] Add a one-entry cache to DiagStateMap::getFile() (PR #228956)
Nico Weber via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 4 17:33:26 PDT 2026
nico wrote:
AI-assisted.
I also tried replacing the std::map with a DenseMap, but that got a bit messy because ASTWriter then has to sort before writing. Just the one-element cache is a bigger win than just the DenseMap (-0.93% vs -0.77% instructions; doing both is -1.03%). Since they compose and this one is smaller, nicer, more self-contained, and a bigger win, I figured I'd send out this version.
https://github.com/llvm/llvm-project/pull/228956
More information about the cfe-commits
mailing list