aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-01-14 16:32:05 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-01-14 16:32:05 +0000
commit09dd3798e100ace40defdc5541277502346213f2 (patch)
tree69decdebd982bb39d1f87d022ca45ddf23e9c704 /lib/Sema/SemaDecl.cpp
parent0e6a16f3e8c8d80a61e89848d216972aa8daea27 (diff)
Pool allocate ImplicitConversionSequences.
To avoid malloc thrashing give OverloadCandidateSet an inline capacity for conversion sequences. We use the fact that OverloadCandidates never outlive the OverloadCandidateSet and have a fixed amount of conversion sequences. This eliminates the oversized SmallVector from OverloadCandidate shrinking it from 752 to 208 bytes. On the test case from the "Why is CLANG++ so freaking slow" thread on llvmdev this avoids one gig of vector reallocation (including memcpy) which translates into 5-10% speedup on Lion/x86_64. Overload candidate computation is still the biggest malloc contributor when compiling templated c++ code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148186 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
0 files changed, 0 insertions, 0 deletions