forked from OSchip/llvm-project
[LLD][COFF] PDB: Parallel sort publics
Saves up to 1.3 sec on large PDBs. Figures below are for the "Globals Stream Layout" pass: Before This patch Large EXE (PDB is ~2 GB) 3330 ms 2022 ms Large EXE (PDB is ~2 GB) 2680 ms 1608 ms Large DLL (PDB is ~1 GB) 1455 ms 938 ms Large DLL (PDB is ~800 MB) 1215 ms 800 ms Small DLL (PDB is ~200 MB) 224 ms 146 ms Differential Revision: https://reviews.llvm.org/D56334 llvm-svn: 350452
This commit is contained in:
parent
9f0c21c1e0
commit
383be892fc
|
@ -53,6 +53,7 @@
|
|||
#include "llvm/Support/Errc.h"
|
||||
#include "llvm/Support/FormatVariadic.h"
|
||||
#include "llvm/Support/JamCRC.h"
|
||||
#include "llvm/Support/Parallel.h"
|
||||
#include "llvm/Support/Path.h"
|
||||
#include "llvm/Support/ScopedPrinter.h"
|
||||
#include <memory>
|
||||
|
@ -1387,7 +1388,7 @@ void PDBLinker::addObjectsToPDB() {
|
|||
|
||||
if (!Publics.empty()) {
|
||||
// Sort the public symbols and add them to the stream.
|
||||
std::sort(Publics.begin(), Publics.end(),
|
||||
sort(parallel::par, Publics.begin(), Publics.end(),
|
||||
[](const PublicSym32 &L, const PublicSym32 &R) {
|
||||
return L.Name < R.Name;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue