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

Reduce coreclr and clrjit sizes on macOS via -Oz and -fno-unroll-loops #13073

Closed
EgorBo opened this issue Jul 13, 2019 · 2 comments
Closed

Reduce coreclr and clrjit sizes on macOS via -Oz and -fno-unroll-loops #13073

EgorBo opened this issue Jul 13, 2019 · 2 comments
Labels
area-PAL-coreclr tenet-performance Performance related issue
Milestone

Comments

@EgorBo
Copy link
Member

EgorBo commented Jul 13, 2019

I tested different flags passed to clang on macOS to build libcoreclr.dylib and libclrjit.dylib:

image

so -fno-unroll-loops saves 200kb on these two files (btw, this option is disabled by default in Xcode).

-Oz (implies -fno-unroll-loops) saves 2Mb! I am not sure about the performance penalties yet but 2 Mb sounds nice.

According to this SO answer, the difference between -O2 and -Os/z are the following LLVM optimization passes:
image

Thus, a minimal "Hello world" self-contained x64 app can be less than 11mb or (4.5mb if compressed)

image

@msftgits msftgits transferred this issue from dotnet/coreclr Jan 31, 2020
@msftgits msftgits added this to the Future milestone Jan 31, 2020
@ghost
Copy link

ghost commented Feb 21, 2024

Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.

This process is part of our issue cleanup automation.

@ghost ghost added backlog-cleanup-candidate An inactive issue that has been marked for automated closure. no-recent-activity labels Feb 21, 2024
@ghost
Copy link

ghost commented Mar 6, 2024

This issue will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days. It is still possible to reopen or comment on the issue, but please note that the issue will be locked if it remains inactive for another 30 days.

@ghost ghost closed this as completed Mar 6, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 7, 2024
@dotnet-policy-service dotnet-policy-service bot removed no-recent-activity backlog-cleanup-candidate An inactive issue that has been marked for automated closure. labels Apr 7, 2024
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-PAL-coreclr tenet-performance Performance related issue
Projects
None yet
Development

No branches or pull requests

2 participants