[all-commits] [llvm/llvm-project] 75ea78: [DebugNames] Compare TableEntry names more efficie...
Felipe de Azevedo Piovezan via All-commits
all-commits at lists.llvm.org
Tue Jan 30 14:28:24 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 75ea78ab677f8357aa14fd4c0aff5d551a4ff8aa
https://github.com/llvm/llvm-project/commit/75ea78ab677f8357aa14fd4c0aff5d551a4ff8aa
Author: Felipe de Azevedo Piovezan <fpiovezan at apple.com>
Date: 2024-01-30 (Tue, 30 Jan 2024)
Changed paths:
M llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h
M llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
Log Message:
-----------
[DebugNames] Compare TableEntry names more efficiently (#79759)
TableEntry names are pointers into the string table section, and
accessing their
length requires a search for `\0`. However, 99% of the time we only need
to
compare the name against some other other, and such a comparison will
fail as
early as the first character.
This commit adds a method to the interface of TableEntry so that such a
comparison can be done without extracting the full name. It saves 10% in
the
time (1250ms -> 1100 ms) to evaluate the following expression.
```
lldb \
--batch \
-o "b CodeGenFunction::GenerateCode" \
-o run \
-o "expr Fn" \
-- \
clang++ -c -g test.cpp -o /dev/null &> output
```
More information about the All-commits
mailing list