[lld] r231584 - Resolver: Use LLVM StringMap and DenseMap.
Jean-Daniel Dupas
mailing at xenonium.com
Sun Mar 8 10:38:10 PDT 2015
Just out of curiosity, what STL lib are you using for your tests ?
> Le 8 mars 2015 à 03:44, Rui Ueyama <ruiu at google.com> a écrit :
>
> Author: ruiu
> Date: Sat Mar 7 20:44:51 2015
> New Revision: 231584
>
> URL: http://llvm.org/viewvc/llvm-project?rev=231584&view=rev
> Log:
> Resolver: Use LLVM StringMap and DenseMap.
>
> All defined symbols from all archive files are inserted to _archiveMap,
> so performance of hash table matters here (I'm not trying to convert
> all std::maps with DenseMaps). This change seems to make the linker
> 0.5% - 1% faster for my test case.
>
> Modified:
> lld/trunk/include/lld/Core/Resolver.h
>
> Modified: lld/trunk/include/lld/Core/Resolver.h
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Resolver.h?rev=231584&r1=231583&r2=231584&view=diff
> ==============================================================================
> --- lld/trunk/include/lld/Core/Resolver.h (original)
> +++ lld/trunk/include/lld/Core/Resolver.h Sat Mar 7 20:44:51 2015
> @@ -100,8 +100,8 @@ private:
> size_t _fileIndex;
>
> // Preloading
> - std::map<StringRef, ArchiveLibraryFile *> _archiveMap;
> - std::unordered_set<ArchiveLibraryFile *> _archiveSeen;
> + llvm::StringMap<ArchiveLibraryFile *> _archiveMap;
> + llvm::DenseSet<ArchiveLibraryFile *> _archiveSeen;
>
> // List of undefined symbols.
> std::vector<StringRef> _undefines;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list