Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select optimisation level per dependency #56

Merged
merged 1 commit into from
Sep 30, 2023
Merged

Select optimisation level per dependency #56

merged 1 commit into from
Sep 30, 2023

Conversation

kleisauke
Copy link
Member

Use a default optimisation level of -Os, selectively compile with -O3 for dependencies that benefit.

Resolves: #55.


Here's a size comparison for the Windows x64 binaries (statically-linked "web" variant).

Before (commit 41e8e1c):

$ du -sbc *.dll
1184256		libglib-2.0-0.dll
243712		libgobject-2.0-0.dll
19117568	libvips-42.dll
456192		libvips-cpp-42.dll
21001728	total

After (this PR):

$ du -sbc *.dll
1012736		libglib-2.0-0.dll
215552		libgobject-2.0-0.dll
17845248	libvips-42.dll
456192		libvips-cpp-42.dll
19529728	total

So, a ~7% reduction in binary size.

Use a default optimisation level of `-Os`, selectively compile with
`-O3` for dependencies that benefit.
Copy link
Member

@lovell lovell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Briljant, dankjewel Kleis.

@kleisauke kleisauke merged commit df96594 into master Sep 30, 2023
@kleisauke kleisauke deleted the issue-55 branch September 30, 2023 08:05
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.

Possible improvement: use default optimisation level of -Os, selectively compile at -O3
2 participants