[PATCH] D131247: [ELF] Parallelize writes of different OutputSections

Andrew Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 11 11:16:04 PDT 2022


andrewng added inline comments.


================
Comment at: lld/ELF/OutputSections.cpp:476
+  size_t taskSize = sections.size() >> 1 >> Log2_64_Ceil(config->threadCount);
+  asyncParallelFor(tg, std::max<size_t>(256, taskSize), 0, sections.size(), fn);
 }
----------------
Didn't get much time to investigate the Windows performance degradation. However, lowering `256` to `16` appears to "fix" the issue for the test cases that I've tried so far. In all the "bad" cases, the performance is about the same or slightly better (1-3%). For a link of `clang` the improvement is ~9% for both values. Still don't really know the reasoning behind this behaviour.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131247/new/

https://reviews.llvm.org/D131247



More information about the llvm-commits mailing list