[PATCH] D16672: SmallPtrSet: Avoid initializing Array in the small case.
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 27 22:08:42 PST 2016
MatzeB created this revision.
MatzeB added reviewers: dblaikie, chandlerc, reames, bkramer, hfinkel.
MatzeB added a subscriber: llvm-commits.
MatzeB set the repository for this revision to rL LLVM.
Herald added a subscriber: mcrosier.
This patch avoids the initial memset at the cost of making iterators
slightly more complex. This should be beneficial as most SmallPtrSets
hold no or only a few elements, while iterating over them is less
It's not a measurable change in compiletime but valgrind/callgrind shows saving of ~0.25% instructions in my tests.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4484 bytes
Desc: not available
More information about the llvm-commits