Skip to content

perf(elf): accelerate large retained-section output emission - #76

Merged
zackees merged 17 commits into
mainfrom
perf/issue-74-large-section-output
Aug 25, 2026
Merged

zackees merged 17 commits into
mainfrom
perf/issue-74-large-section-output

Conversation

@zackees

@zackees zackees commented Aug 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • add an exact-SHA, retained-large-output Linux benchmark gate with round-robin trials, phase diagnostics, filesystem metadata, and isolated history
  • rebalance large section copy work and preallocate large ext4 mmap outputs without changing small-link or explicit output-mode behavior
  • replace bare/fast ELF build-ID BLAKE3 hashing with full-content XXH3-128 while preserving explicit named-mode behavior
  • keep the benchmark workflow Bash-only with one uv sync --extra dev and subsequent uv run --no-sync ... commands

RED → GREEN evidence

Final exact-SHA all-platform workflow: https://github.com/zackees/reld/actions/runs/32853535193

Linux paired exact baseline (be6a8cd032ea6dc788978264c860fe761d5090b6) versus HEAD (887e4275ec1bc4ff87e2c962ffb84a4e61390061):

Configuration Baseline median HEAD median Improvement Baseline build ID HEAD build ID Build-ID reduction
no-LTO 468.91 ms 385.24 ms 17.84% 61.50 ms 24.33 ms 60.44%
ThinLTO 426.19 ms 363.64 ms 14.68% 51.81 ms 19.67 ms 62.03%
full-LTO 400.60 ms 349.65 ms 12.72% 49.18 ms 18.79 ms 61.79%

The published-link rows also put native reld ahead of Wild in all three configurations on this run. Startup remained separate and unsubtracted; the largest startup was 11.5 ms, below 3.3% of the Wild reference link in every row.

The Linux, macOS, Windows, graph rendering, README block, exact-SHA, history isolation, and freshness/schema jobs all passed.

Small-link non-regression

A separate bosn Linux probe built the exact baseline and HEAD in release mode, compiled one _start input outside timing, replayed only the native final link with fixed --no-fork --threads=4 --build-id flags for 100 measured rounds per binary after four warmups, alternated order, and executed every output:

Binary Median MAD
exact baseline 4.320 ms 0.367 ms
HEAD 4.120 ms 0.250 ms

HEAD was 4.62% faster, satisfying the no-more-than-2% ordinary-link regression requirement.

Validation

  • uv sync --extra dev
  • uv run --no-sync pytest ci/tests -q — 148 passed
  • bosn run -- cargo clippy -p reld-core --no-default-features
  • bosn run -- bash -c 'cargo test -p reld-core --no-default-features -- --skip tidy_tests::check_sources_format --skip tidy_tests::check_toml_format' — 157 passed, 2 environment-only tidy checks skipped because the existing image lacks clang-format and taplo
  • bosn smoke
  • real ELF build-ID smoke: all outputs executed; readelf -n recognized bare, fast, md5, and sha1 notes with preserved mode widths
  • three clud-review cycles completed during implementation; all findings were addressed before the final candidate

Closes #74
Related: #75

@zackees
zackees marked this pull request as ready for review August 25, 2026 13:52
@zackees

zackees commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator Author

CI infrastructure note before merge: Linker artifacts / Build / linux failed twice in setup-soldr before any repository build command because https://zackees.github.io/soldr-toolchain/catalogue.v1.json returned HTTP 404. The file exists on the external repository's assets branch, but GitHub Pages is still serving an older deployment (655308c2, 2026-08-25 04:03 UTC). This is independent of this PR. Native Linux remains covered by green Phase 1, linker-mode, bosn, clippy/test/smoke, and exact benchmark jobs; macOS and Windows artifact builds passed.

@zackees
zackees merged commit ee62075 into main Aug 25, 2026
21 of 23 checks passed
@zackees
zackees deleted the perf/issue-74-large-section-output branch August 25, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf(elf): accelerate large retained-section output emission

1 participant