[PATCH] MCObjectSymbolizer

Chandler Carruth chandlerc at google.com
Mon Oct 14 18:23:37 PDT 2013


On Mon, Oct 14, 2013 at 3:49 PM, Stephen Checkoway <s at pahtak.org> wrote:

> MCObjectSymbolizer currently iterates through each symbol every time it is
> asked to tryAddingSymbolicOperand. With many symbols, this takes a very
> long time.
>
> The attached patch iterates through the symbols the first time this is
> needed and puts them in a sorted vector. Subsequent lookups use
> std::upper_bound() to find the symbol in log(n) time.
>

While this is great, this really sounds like it should be putting things
into a hash table based datastructure. DenseMap most likely. That will
likely give you yet more performance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131014/d138c133/attachment.html>


More information about the llvm-commits mailing list