This uses the same allocators for sections.
It ranges from a tiny slowdown to a quite noticeable speedup.
In a followup patch I will try to further reduce the number of allocators and simplify the code by using a global variable.
Paths
| Differential D26006
Further reduce the number of allocators Needs ReviewPublic Authored by • espindola on Oct 26 2016, 12:42 PM.
Details
Summary This uses the same allocators for sections. It ranges from a tiny slowdown to a quite noticeable speedup. In a followup patch I will try to further reduce the number of allocators and simplify the code by using a global variable.
Diff Detail Event Timeline• rafael updated this object. Comment ActionsThe perf numbers I got: firefox master 7.177125163 patch 7.182606942 1.00076378479x slower firefox-gc master 7.374067189 patch 7.381466572 1.00100343309x slower chromium master 5.120661949 patch 4.981522129 1.02793118577x faster chromium fast master 1.963941995 patch 1.85967246 1.05606876331x faster the gold plugin master 0.347964045 patch 0.340951595 1.02056728903x faster clang master 0.589530331 patch 0.578198657 1.01959823646x faster llvm-as master 0.034089395 patch 0.03350961 1.01730205156x faster the gold plugin fsds master 0.376985041 patch 0.370091689 1.01862606539x faster clang fsds master 0.671836293 patch 0.662105439 1.01469683441x faster llvm-as fsds master 0.031508503 patch 0.031008237 1.01613332612x faster scylla master 3.220639954 patch 3.22094804 1.00009565987x slower Comment Actions With your change to call _exit, you can't see any difference in performance, no? Because this change is a bit complicated, I'd want to not have this one if it doesn't improve performance in normal use cases. Comment Actions I don't think I fully understand why this can make things faster. This patch replaces llvm::SpecificBumpPtrAllocator<[derived class of InputSection]> with std::unique_ptr<InputSection>, so the number of allocations and the number of deallocation (which should be zero if _exit is called) don't change, IIUC.
Revision Contents
Diff 75931 ELF/Driver.cpp
ELF/ICF.cpp
ELF/InputFiles.h
ELF/InputFiles.cpp
ELF/InputSection.cpp
ELF/LinkerScript.cpp
ELF/MarkLive.cpp
ELF/Writer.cpp
|