Refactor RenamerClangTidyCheck to achieve better performance
by removing object copies, duplicated function calls and by
using RecursiveASTVisitor.
Measured -72% execution time on bugprone-reserved-identifier.
Paths
| Differential D149723
[clang-tidy] Optimize performance of RenamerClangTidyCheck ClosedPublic Authored by PiotrZSL on May 2 2023, 10:52 PM.
Details Summary Refactor RenamerClangTidyCheck to achieve better performance Measured -72% execution time on bugprone-reserved-identifier.
Diff Detail
Event TimelineComment Actions Mostly looks good, just a few small nits
This revision is now accepted and ready to land.May 5 2023, 7:05 AM PiotrZSL added inline comments.
PiotrZSL marked 3 inline comments as done. Comment ActionsUse operator + instead of hash_combine. Closed by commit rG1c282052624f: [clang-tidy] Optimize performance of RenamerClangTidyCheck (authored by PiotrZSL). · Explain WhyMay 6 2023, 5:24 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 520074 clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.h
clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp
|
What's the purpose of using hash_combine instead of just adding the 2 hashes together, there is enough entropy in the hashes that a simple operation makes more sense?