How long a link takes, and where llvm-ld saves the time, right now. Every number is a paired A/B measured in one run on one machine: llvm-ld as it is built to be fast (the link-speed patches plus PGO, ThinLTO and BOLT, via tools/pgo_build.py) against stock lld from the same LLVM 23.1.0 payload before the link-speed patches, built plain (-O3), linking the same corpora interleaved. Both factors are in the numbers: the source patches speed up PDB emission, and PGO + BOLT speed up everything, including LTO codegen. Hosted runners are shared and noisy, so times are only compared within a run, never across runs.
Every cell is gated on byte-identical output: the candidate's EXE (and PDB, when the variant writes one) match the baseline's exactly, and both are self-deterministic. A speedup that changes output bytes is a bug, not a result.
Each corpus is linked twice with the same objects, once per variant, so the hatched segment is only the PDB's extra time:
no /debug/debug:full /pdbaltpath:%_PDB%Build types:
objects: clang -O0 -g -gcodeview · link: /opt:noref /opt:noicf; unoptimized objects, largest debug info, no linker GC or ICF.objects: clang -O2 -g -gcodeview · link: /opt:ref /opt:icf; optimized objects with debug info.objects: clang -O2 -g -gcodeview -flto=thin · link: /opt:ref /opt:icf; the link runs LLVM codegen, which the patches do not touch. Only small is measured: one medium ThinLTO link takes ~2 minutes even on 16 cores.| Build | Variant | Corpus | Threads | Runs | Saved (IQR) | llvm-ld ms | Stock ms | CPU | Peak RSS | EXE | PDB |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Debug | link | small · 64 objects | 1 | 9 | +25.9% (+23.6..+26.4) | 6.9 | 9.2 | -26.3% | +0.0% | aa441509b521 | none |
| Debug | link + PDB | small · 64 objects | 1 | 9 | +31.3% (+30.4..+32.6) | 21.4 | 31.0 | -32.0% | +0.0% | 446520dc5290 | e745d5b749a3 |
| Debug | link | small · 64 objects | 2 | 9 | +23.5% (+22.7..+23.8) | 7.4 | 9.7 | -22.6% | +0.0% | aa441509b521 | none |
| Debug | link + PDB | small · 64 objects | 2 | 9 | +36.4% (+35.1..+39.0) | 18.8 | 29.1 | -28.3% | +0.0% | b15b1c8b3455 | 2041beccb8fc |
| Debug | link | small · 64 objects | 4 | 9 | +23.4% (+23.0..+26.4) | 7.6 | 10.2 | -24.1% | +0.0% | aa441509b521 | none |
| Debug | link + PDB | small · 64 objects | 4 | 9 | +37.1% (+36.8..+37.9) | 17.4 | 27.7 | -26.4% | +0.0% | c44f31d753d6 | 57afdf8e99c4 |
| Debug | link | medium · 512 objects | 1 | 9 | +31.0% (+30.7..+32.0) | 49.0 | 70.9 | -31.3% | +0.0% | 6f1849fff359 | none |
| Debug | link + PDB | medium · 512 objects | 1 | 9 | +34.8% (+34.6..+35.2) | 209.1 | 320.9 | -35.6% | -1.9% | d8421139beb6 | 0e609754a0fe |
| Debug | link | medium · 512 objects | 2 | 9 | +31.9% (+31.0..+32.2) | 48.3 | 70.5 | -30.5% | +0.0% | 6f1849fff359 | none |
| Debug | link + PDB | medium · 512 objects | 2 | 9 | +41.6% (+39.7..+42.6) | 165.8 | 277.8 | -29.4% | -2.4% | 67d4175aac1a | a4a6039426ad |
| Debug | link | medium · 512 objects | 4 | 9 | +32.2% (+31.2..+32.5) | 45.0 | 66.1 | -29.5% | +0.0% | 6f1849fff359 | none |
| Debug | link + PDB | medium · 512 objects | 4 | 9 | +45.6% (+44.9..+45.9) | 140.6 | 258.2 | -28.1% | -2.3% | e525f9a8acae | 4d6a0cd9b7f2 |
| Debug | link | large · 2048 objects | 1 | 9 | +29.4% (+28.6..+30.3) | 277.5 | 390.9 | -29.1% | -2.0% | 3cba4e41ea8b | none |
| Debug | link + PDB | large · 2048 objects | 1 | 9 | +33.5% (+33.2..+34.1) | 1171.8 | 1765.3 | -34.0% | +3.5% | b6d6ac8ffcf8 | 763e176be9f6 |
| Debug | link | large · 2048 objects | 2 | 9 | +33.5% (+31.7..+33.9) | 245.2 | 367.0 | -28.6% | -2.0% | 3cba4e41ea8b | none |
| Debug | link + PDB | large · 2048 objects | 2 | 9 | +43.6% (+41.3..+44.3) | 830.2 | 1468.8 | -31.2% | +4.1% | 3f5fc5d21afc | a9cfea89d5f6 |
| Debug | link | large · 2048 objects | 4 | 9 | +33.0% (+32.5..+33.3) | 227.3 | 340.9 | -25.8% | -2.0% | 3cba4e41ea8b | none |
| Debug | link + PDB | large · 2048 objects | 4 | 9 | +48.4% (+47.8..+49.3) | 699.0 | 1345.0 | -25.6% | +4.1% | 68c45d203be7 | 3526317dd534 |
| Release | link | small · 64 objects | 1 | 9 | +14.5% (+12.8..+19.1) | 5.8 | 6.8 | -15.1% | +0.0% | 08b3db4df8fe | none |
| Release | link + PDB | small · 64 objects | 1 | 9 | +34.1% (+32.2..+36.0) | 13.9 | 21.8 | -36.3% | +0.0% | 6eaa9d0067f5 | cb37b3dec35d |
| Release | link | small · 64 objects | 2 | 9 | +14.7% (+13.1..+17.7) | 6.0 | 7.2 | -14.7% | +0.0% | 08b3db4df8fe | none |
| Release | link + PDB | small · 64 objects | 2 | 9 | +35.0% (+32.4..+36.5) | 14.0 | 21.3 | -27.9% | +0.0% | 0676493d4d40 | 60144d6aedbc |
| Release | link | small · 64 objects | 4 | 9 | +13.8% (+12.7..+15.6) | 5.8 | 6.8 | -13.6% | +0.0% | 08b3db4df8fe | none |
| Release | link + PDB | small · 64 objects | 4 | 9 | +35.5% (+33.4..+36.5) | 12.4 | 19.2 | -26.5% | +0.0% | fb418a51cc2b | 8c914751050c |
| Release | link | medium · 512 objects | 1 | 9 | +12.6% (+7.7..+14.4) | 46.1 | 52.4 | -14.6% | +0.0% | 297950d80255 | none |
| Release | link + PDB | medium · 512 objects | 1 | 9 | +26.0% (+24.0..+26.9) | 217.9 | 296.0 | -36.8% | -3.9% | 751a10a9736e | 4c62a10b0b0f |
| Release | link | medium · 512 objects | 2 | 9 | +18.8% (+15.8..+19.3) | 42.1 | 49.8 | -14.5% | +0.0% | 297950d80255 | none |
| Release | link + PDB | medium · 512 objects | 2 | 9 | +26.6% (+25.9..+32.1) | 197.0 | 278.9 | -31.8% | -4.5% | 928984f526b3 | c04b519481b9 |
| Release | link | medium · 512 objects | 4 | 9 | +7.1% (-0.0..+14.2) | 47.8 | 47.9 | -13.5% | +0.0% | 297950d80255 | none |
| Release | link + PDB | medium · 512 objects | 4 | 9 | +27.7% (+27.2..+35.2) | 179.5 | 253.7 | -29.8% | -4.6% | 5f0cc5680337 | ab3348a7339a |
| Release | link | large · 2048 objects | 1 | 9 | +10.2% (+6.5..+12.2) | 389.3 | 435.2 | -18.1% | -2.5% | b1cb1d1fbe6e | none |
| Release | link + PDB | large · 2048 objects | 1 | 9 | +22.1% (+18.8..+23.0) | 1440.0 | 1859.4 | -38.3% | +1.9% | de4fddd3c1af | 7b11c97330f9 |
| Release | link | large · 2048 objects | 2 | 9 | +10.5% (+9.9..+11.4) | 344.2 | 388.7 | -15.2% | -2.5% | b1cb1d1fbe6e | none |
| Release | link + PDB | large · 2048 objects | 2 | 9 | +24.6% (+22.7..+26.4) | 1269.8 | 1691.1 | -33.2% | +1.1% | 7d0e68c43d05 | 30c9d57e1a24 |
| Release | link | large · 2048 objects | 4 | 9 | +12.0% (+10.0..+12.8) | 338.1 | 380.1 | -15.9% | -2.5% | b1cb1d1fbe6e | none |
| Release | link + PDB | large · 2048 objects | 4 | 9 | +24.7% (+22.7..+26.7) | 1191.6 | 1610.1 | -27.6% | +1.1% | 29b75132964a | 5302e7a17a95 |
| ThinLTO | link | small · 64 objects | 4 | 5 | +43.0% (+42.9..+43.2) | 9267.1 | 16421.3 | -43.7% | +0.0% | c245d815f4fa | none |
| ThinLTO | link + PDB | small · 64 objects | 4 | 5 | +43.3% (+43.3..+43.5) | 9299.3 | 16456.7 | -43.3% | +0.0% | 6dea2953bc45 | 99aaae384cbd |
Thread counts measured this run: 1, 2, 4. The workflow measures 1, 2 and 4 threads plus the runner's core count (4) when that is larger than 4; the chart shows each build type at its highest, 4 threads here. The headline +46% in the project notes was measured at 16 threads on a local workstation; this run's highest thread count cannot reproduce that regime, so the speedup at 4 threads is expected to be smaller.
ThinLTO is measured on small at the highest thread count only: the link runs LLVM codegen, which the patches do not touch. Only small is measured: one medium ThinLTO link takes ~2 minutes even on 16 cores.
Allocator: on Linux the benchmarked llvm-ld-direct allocates through glibc malloc, because MI_MALLOC_OVERRIDE is defined only for WIN32 builds in CMakeLists.txt. The shipped Windows DLL allocates through mimalloc. These are parallelisation patches, and allocator behaviour under thread contention differs between glibc arenas and mimalloc.
Measured on Linux; the shipping target is Windows. That the relative speedup transfers to Windows is asserted, not measured: no Windows run of this paired ratio has been published yet, and at least one optimised phase is known to diverge (createFutureForFile is std::launch::deferred on Linux and std::launch::async under _WIN64).
Run 40469845631 attempt 1;
source fed92e11c7c51d612714890b2fcd19d4ebd35525;
baseline f9cdd65cbfb5f64654ce428524a8126652bed8a7
(stock lld: the payload before the link-speed patches, plain -O3 build).
Runner Ubuntu 24.04.5 LTS, AMD EPYC 7763 64-Core Processor / AMD EPYC 9V45 96-Core Processor,
4 cores, kernel 6.17.0-1022-azure;
fingerprint 94b545756d982eea4820bda6205fd3706e5afd025dbc0e6ff55490e0a968b9a8.
python tests/perf/gen_corpus.py --out build-perf/corpus --mode release --profile large
python tests/perf/bench.py --candidate build/llvm-ld-direct --baseline build-perf/baseline/llvm-ld-direct --corpus build-perf/corpus/release/large --variant pdb --threads 4 --runs 9