[PATCH] D45548: Avoid hash table lookup when sorting local symbols.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 13 01:38:45 PDT 2018
grimar added a comment.
In https://reviews.llvm.org/D45548#1066314, @espindola wrote:
> The results I got
>
> master: 2.819319468 seconds time elapsed
> This patch: 2.735310955 seconds time elapsed
> https://reviews.llvm.org/D45519: 2.624760166 seconds time elapsed
> combined: 2.604495001 seconds time elapsed
>
> So I think we want both.
Thanks for the numbers. For me having combined version is fine. Rui, what do you think? (I'll rebase mine when/if this be landed).
> With this patch the map
>
> MapVector<InputFile *, std::vector<SymbolTableEntry>> Arr;
>
> in https://reviews.llvm.org/D45519 can become a simple array, no?
There is one minor issue I am thinking about. We will need the array of size [number of files].
We could use the `NextFileId` to find array size, but since LLD can be used as a library, we
will have to reset `NextFileId` to zero value in `elf::link`, otherwise, we will have a hidden issue here,
which will lead to creating arrays larger than needed.
(this is one line change fix, posted just for the record to not forget. Probably it worth to include that change
to this patch).
https://reviews.llvm.org/D45548
More information about the llvm-commits
mailing list