Repository navigation
build: optimize release binaries and report packaged size - #545
Open
QuadnucYard wants to merge 1 commit into
Open
QuadnucYard wants to merge 1 commit into
QuadnucYard wants to merge 1 commit into
Conversation
Use one codegen unit in the native `ci` profile to reduce duplicate monomorphizations and give LLVM more scope to optimize. On Windows x64, this reduced `typstyle.exe` from 2,161,664 to 1,800,704 bytes (16.7%). Use `cargo bloat` to build the Linux x64 executable in regular CI and retain its per-crate code sizes. Record the exact file size after splitting debug symbols, when the executable is ready to upload. Compare the base and proposed merge in the PR report. Fetch their size reports from CI so Criterion can run without rebuilding the CLI.
📊 Benchmark Performance Reportgroup base pr
----- ---- --
pretty-ai-comprehensive-showcase 1.00 861.5±5.27µs ? ?/sec 1.00 858.8±7.25µs ? ?/sec
pretty-cetz-manual 1.01 698.2±13.26µs ? ?/sec 1.00 690.3±7.38µs ? ?/sec
pretty-codly 1.00 1688.6±15.84µs ? ?/sec 1.00 1689.3±11.49µs ? ?/sec
pretty-cpe 1.00 11.6±0.44ms ? ?/sec 1.72 20.0±2.20ms ? ?/sec
pretty-deep-nested-args 1.00 15.0±0.15µs ? ?/sec 1.00 15.0±0.15µs ? ?/sec
pretty-fletcher-diagram 1.00 483.6±19.30µs ? ?/sec 1.00 485.4±5.17µs ? ?/sec
pretty-fletcher-draw 1.00 1185.2±15.95µs ? ?/sec 1.00 1181.5±10.01µs ? ?/sec
pretty-tablex 1.00 3.2±0.02ms ? ?/sec 1.01 3.2±0.12ms ? ?/sec
pretty-touying-core 1.00 2.0±0.03ms ? ?/sec 1.00 2.0±0.01ms ? ?/sec
pretty-touying-utils 1.00 1147.1±11.34µs ? ?/sec 1.01 1160.1±31.10µs ? ?/sec
pretty-undergraduate-math 1.02 870.3±15.40µs ? ?/sec 1.00 851.4±14.70µs ? ?/sec
typst-docs/all 1.00 10.5±0.40ms 53.0 MB/sec 1.05 11.1±0.73ms 50.5 MB/sec
typst-docs/wrap/fill 1.00 17.4±0.41ms 32.2 MB/sec 1.00 17.4±0.28ms 32.0 MB/sec
typst-docs/wrap/fill-sentence 1.01 22.0±0.73ms 25.4 MB/sec 1.00 21.7±0.38ms 25.7 MB/sec
typst-docs/wrap/sentence 1.00 15.5±0.08ms 36.1 MB/sec 1.00 15.5±0.25ms 36.0 MB/sec📏 Binary Size Comparison (x86_64-unknown-linux-gnu)
📦 Crate Sizes (cargo-bloat)Per-crate code sizes are estimates. std 396.2 kB
clap_builder 256.7 kB
typstyle_core 142.8 kB
typst_syntax 103.9 kB
typstyle 92.8 kB
similar 90.9 kB
clap_complete 80.9 kB
prettyless 25.9 kB
walkdir 12.4 kB
anyhow 8.4 kB
colored 8.2 kB
hashbrown 6.7 kB
darling_core 6.3 kB
unicode_segmentation 6.2 kB
vergen_gitcl 5.0 kB
heck 4.8 kB
ecow 4.7 kB
synstructure 4.2 kB
proc_macro2 3.9 kB
anstream 3.5 kBGenerated by GitHub Actions on 2026-11-28 13:57:31 UTC |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use one codegen unit in the native
ciprofile to reduce duplicate monomorphizations and give LLVM more scope to optimize. On Windows x64, this reducedtypstyle.exefrom 2,161,664 to 1,800,704 bytes (16.7%).Use
cargo bloatto build the Linux x64 executable in regular CI and retain its per-crate code sizes. Record the exact file size after splitting debug symbols, when the executable is ready to upload.Compare the base and proposed merge in the PR report. Fetch their size reports from CI so Criterion can run without rebuilding the CLI.