aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/VirtualFileSystem.cpp
diff options
context:
space:
mode:
authorFelipe de Azevedo Piovezan <fpiovezan@apple.com>2024-01-30 14:28:11 -0800
committerGitHub <noreply@github.com>2024-01-30 14:28:11 -0800
commit75ea78ab677f8357aa14fd4c0aff5d551a4ff8aa (patch)
tree1d6fe44e1fb55d5b9ca967323a5596fed6255f68 /llvm/lib/Support/VirtualFileSystem.cpp
parent24923214e7845acc0e2f56f13e08ee519eba8303 (diff)
downloadllvm-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/lib/Support/VirtualFileSystem.cpp')
0 files changed, 0 insertions, 0 deletions