Skip to content

build: optimize the release profile (LTO, single codegen unit, strip) - #50

Merged
merlimat merged 1 commit into
mainfrom
feat/release-profile
Jul 17, 2026
Merged

build: optimize the release profile (LTO, single codegen unit, strip)#50
merlimat merged 1 commit into
mainfrom
feat/release-profile

Conversation

@merlimat

Copy link
Copy Markdown
Contributor

Adds a [profile.release] to the workspace root that enables whole-program LTO, a single codegen unit, and symbol stripping.

This produces a faster, smaller release binary — most relevant for the oxia-perf benchmark tool, where a debug/less-optimized build would skew throughput and latency numbers. The oxia-perf binary shrinks from 5.7 MB → 3.2 MB.

[profile.release]
lto = true
codegen-units = 1
strip = true

Trade-off: release builds compile more slowly (whole-program LTO). Verified cargo build --release succeeds and the binary runs.

Whole-program LTO and a single codegen unit produce a faster, smaller
release binary — worthwhile for the oxia-perf benchmark tool — and strip
drops debug symbols (the oxia-perf binary shrinks from 5.7M to 3.2M).

Signed-off-by: Matteo Merli <mmerli@apache.org>
@merlimat
merlimat merged commit 098f2e6 into main Jul 17, 2026
3 checks passed
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.

1 participant