diff options
author | Kostya Kortchinsky <kostyak@google.com> | 2017-04-24 14:53:38 +0000 |
---|---|---|
committer | Kostya Kortchinsky <kostyak@google.com> | 2017-04-24 14:53:38 +0000 |
commit | 38199b2a30f0c046e9b5a8ea76f324c0bb0d445f (patch) | |
tree | fbc3c0bd4f0c8e8af82faa3483f2e8964156a11f /lldb/packages/Python/lldbsuite/test/python_api | |
parent | b4b85f2033fcbca13fb154979da8895056eb6254 (diff) | |
download | bcm5719-llvm-38199b2a30f0c046e9b5a8ea76f324c0bb0d445f.tar.gz bcm5719-llvm-38199b2a30f0c046e9b5a8ea76f324c0bb0d445f.zip |
[sanitizer] Cache SizeClassForTransferBatch in the 32-bit local cache
Summary:
`SizeClassForTransferBatch` is expensive and is called for every `CreateBatch`
and `DestroyBatch`. Caching it means `kNumClasses` calls in `InitCache`
instead. This should be a performance gain if more than `kNumClasses / 2`
batches are created and destroyed during the lifetime of the local cache.
I have chosen to fully remove the function and putting the code in `InitCache`,
which is a debatable choice.
In single threaded benchmarks leveraging primary backed allocations, this turns
out to be a sizeable gain in performances (greater than 5%). In multithreaded
benchmarks leveraging everything, it is less significant but still an
improvement (about 1%).
Reviewers: kcc, dvyukov, alekseyshl
Reviewed By: dvyukov
Subscribers: kubamracek, llvm-commits
Differential Revision: https://reviews.llvm.org/D32365
llvm-svn: 301184
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api')
0 files changed, 0 insertions, 0 deletions