llvm-project
b0ce4ad7 - [ELF] MergeNoTailSection: Use partitioned hash aggregation. NFC (#245892)

Commit
14 hours ago
[ELF] MergeNoTailSection: Use partitioned hash aggregation. NFC (#245892) MergeNoTailSection::finalizeContents adds pieces to 32 StringTableBuilder shards, and every thread scans all pieces to pick those of its own shards. Group the live pieces of each chunk of sections by shard in parallel, then add each shard's pieces to its StringTableBuilder on one thread in input order, and store the offsets in a final parallel pass. Process the sections in waves of 4M pieces to bound the memory for the grouped pieces. clang-debug --threads=8: 3.20 -> 2.89 s. merge/finalize: ``` before after clang-debug t8 981 ms 665 ms clang-debug t1 3403 ms 2846 ms clang-release t8 5.5 ms 5.5 ms clang-release t1 8.0 ms 8.8 ms ``` LLM-aided
Author
Parents
Loading