summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/ns.cpp
diff options
context:
space:
mode:
authorBen Craig <ben.craig@codeaurora.org>2016-06-10 13:22:13 +0000
committerBen Craig <ben.craig@codeaurora.org>2016-06-10 13:22:13 +0000
commit330c0b6c8c539589b26acb56c0d87011bac004bd (patch)
treeb117d1450cb532ad81b22b77950de6947506b410 /lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/ns.cpp
parentd93998f60627ff7efc6bb58dd016a95ed5a672af (diff)
downloadbcm5719-llvm-330c0b6c8c539589b26acb56c0d87011bac004bd.tar.gz
bcm5719-llvm-330c0b6c8c539589b26acb56c0d87011bac004bd.zip
Preallocate ExplodedNode hash table
Rehashing the ExplodedNode table is very expensive. The hashing itself is expensive, and the general activity of iterating over the hash table is highly cache unfriendly. Instead, we guess at the eventual size by using the maximum number of steps allowed. This generally avoids a rehash. It is possible that we still need to rehash if the backlog of work that is added to the worklist significantly exceeds the number of work items that we process. Even if we do need to rehash in that scenario, this change is still a win, as we still have fewer rehashes that we would have prior to this change. For small work loads, this will increase the memory used. For large work loads, it will somewhat reduce the memory used. Speed is significantly increased. A large .C file took 3m53.812s to analyze prior to this change. Now it takes 3m38.976s, for a ~6% improvement. http://reviews.llvm.org/D20933 llvm-svn: 272394
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/ns.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud