Skip to content

Diff header: report absolute bytes saved (helps choose -threshold) #56

@peczenyj

Description

@peczenyj

The diff header currently reads:

Mixed: struct of size 24 could be 16 (33.33% smaller)

-threshold filters by absolute bytes saved, but the header only shows a percentage — so there's no number to read off when deciding what threshold to pass. Add the byte count:

Mixed: struct of size 24 could be 16, saving 8 bytes (33.33% smaller)

The "struct of size 24 could be 16" portion is the upstream analyzer's message (verbatim); structalign appends ", saving N bytes" before the existing "(NN.NN% smaller)" suffix. Pluralized ("saving 1 byte"). Same condition as the percentage suffix — only when both sizes are known and the proposed layout is smaller. Updates the diff golden fixtures.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions