[clang] [clang] Reduce the size of ParsedAttributesView and AttributePool (PR #148726)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 15 06:21:23 PDT 2025
================
@@ -808,7 +808,7 @@ class AttributePool {
class ParsedAttributesView {
friend class AttributePool;
- using VecTy = llvm::SmallVector<ParsedAttr *>;
+ using VecTy = llvm::SmallVector<ParsedAttr *, 2>;
----------------
erichkeane wrote:
Curious why '2' was found? Did you see perf-benefit from 2 over 0(aka, `std::vector`)? Presumably the benefit of cache locality isn't really applicable as attributes are comparatively rare, so 'while we're at it', perhaps saving twice as much would be valuable?
https://github.com/llvm/llvm-project/pull/148726
More information about the cfe-commits
mailing list