diff options
author | Felipe de Azevedo Piovezan <fpiovezan@apple.com> | 2024-01-30 14:28:11 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-30 14:28:11 -0800 |
commit | 75ea78ab677f8357aa14fd4c0aff5d551a4ff8aa (patch) | |
tree | 1d6fe44e1fb55d5b9ca967323a5596fed6255f68 /llvm/unittests/Support/VirtualFileSystemTest.cpp | |
parent | 24923214e7845acc0e2f56f13e08ee519eba8303 (diff) | |
download | llvm-75ea78ab677f8357aa14fd4c0aff5d551a4ff8aa.zip llvm-75ea78ab677f8357aa14fd4c0aff5d551a4ff8aa.tar.gz llvm-75ea78ab677f8357aa14fd4c0aff5d551a4ff8aa.tar.bz2 |
[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
```
Diffstat (limited to 'llvm/unittests/Support/VirtualFileSystemTest.cpp')
0 files changed, 0 insertions, 0 deletions