[all-commits] [llvm/llvm-project] fa7414: [ELF] Parallelize --compress-debug-sections=zstd
Fangrui Song via All-commits
all-commits at lists.llvm.org
Wed Sep 21 11:13:19 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fa74144c64dff6b145b0b3fa9397f913ddaa87bf
https://github.com/llvm/llvm-project/commit/fa74144c64dff6b145b0b3fa9397f913ddaa87bf
Author: Fangrui Song <i at maskray.me>
Date: 2022-09-21 (Wed, 21 Sep 2022)
Changed paths:
M lld/ELF/OutputSections.cpp
Log Message:
-----------
[ELF] Parallelize --compress-debug-sections=zstd
See D117853: compressing debug sections is a bottleneck and therefore it
has a large value parallizing the step.
zstd provides multi-threading API and the output is deterministic even with
different numbers of threads (see https://github.com/facebook/zstd/issues/2238).
Therefore we can leverage it instead of using the pigz-style sharding approach.
Also, switch to the default compression level 3. The current level 5
is significantly slower without providing justifying size benefit.
```
'dash b.sh 1' ran
1.05 ± 0.01 times faster than 'dash b.sh 3'
1.18 ± 0.01 times faster than 'dash b.sh 4'
1.29 ± 0.02 times faster than 'dash b.sh 5'
level=1 size: 358946945
level=3 size: 309002145
level=4 size: 307693204
level=5 size: 297828315
```
Reviewed By: andrewng, peter.smith
Differential Revision: https://reviews.llvm.org/D133679
More information about the All-commits
mailing list