Skip to content

build: reduce release artifact size - #17

Merged
justinjoy merged 2 commits into
mainfrom
build/compact-release
Aug 24, 2026
Merged

build: reduce release artifact size#17
justinjoy merged 2 commits into
mainfrom
build/compact-release

Conversation

@justinjoy

Copy link
Copy Markdown
Contributor

Summary

  • compile production release targets at Meson optimization level 2 by default
  • provide -Dcompact_release=false to honor the caller-selected global optimization
  • compare compact O2 artifacts against an explicit O3 control in the main footprint workflow
  • document the measurement convention and updated footprint

Size impact

Measured on x86_64 with GCC 16.2.1. Shared libraries are stripped with strip --strip-unneeded; static archives and the CLI are measured as built.

Artifact O3 control Compact O2 Reduction
shared library 43,168 B 39,072 B 9.5%
static archive 56,142 B 52,358 B 6.7%
chronoid-gen 37,312 B 33,328 B 10.7%

-Os was smaller but roughly doubled KSUID CLI time, while LTO enlarged the static archive more than threefold. O2 retained throughput in the local paired benchmark.

Validation

  • GCC 16.2.1 and Clang 22.1.8 full suites: 23/23 each
  • forced scalar on GCC and Clang: 23/23 each
  • GCC and Clang no-avx2, no-ssse3, and simd=none: 23/23 each
  • clang-tidy: 17 library sources, 0 user-code diagnostics
  • release O2, O3 opt-out, debug, debugoptimized, minsize, and explicit O1 flags verified
  • exported symbols, SONAME, and runtime dependencies unchanged

Native MSVC, macOS, and ARM coverage is delegated to the existing CI matrix.

@justinjoy
justinjoy merged commit 55ddbc5 into main Aug 24, 2026
20 checks passed
@justinjoy
justinjoy deleted the build/compact-release branch August 24, 2026 05:17
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