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

limit codegen-units to get the maximum optimization #1179

Closed
wants to merge 1 commit into from
Closed

limit codegen-units to get the maximum optimization #1179

wants to merge 1 commit into from

Conversation

sabify
Copy link

@sabify sabify commented Mar 13, 2022

Hello,

There might be a performance regression due to enabling lto without limiting the number of code generation units (codegen-units = 1).

References:
rust-lang/rust#47745
https://doc.rust-lang.org/rustc/codegen-options/index.html#codegen-units

@xgreenx
Copy link
Collaborator

xgreenx commented Mar 13, 2022

codegen-units is 1 by default for release contract, so it is enabled.

@ascjones
Copy link
Collaborator

@xgreenx is right, it is already set by cargo-contract

@ascjones ascjones closed this Mar 14, 2022
@sabify
Copy link
Author

sabify commented Mar 14, 2022

If the ink is solely dependent on cargo-contract, how about removing the whole release profile block to avoid misconceptions?

@ascjones
Copy link
Collaborator

Yes we should do that since the profile for the ink workspace itself is not used when building a contract.

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.

3 participants