-
Notifications
You must be signed in to change notification settings - Fork 76
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
Perf: Optimize guest builds #130
Conversation
guests/reth-ethereum/Cargo.toml
Outdated
[profile.dev.build-override] | ||
opt-level = 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build-override
isn't needed anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
somehow I think this is still affecting cycle count after a clean build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand the docs, build-override
only affects how build scripts etc. are built, not the actual crate, so it should have no effect on the cycle count except for some random noise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that context, I don't even understand how the dev profile affects cycle counts, since everything is supposed to be built in release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dev profile indeed had no effect but build-override still does shake off a couple million cycles for some reason.
guests/reth-ethereum/Cargo.toml
Outdated
codegen-units = 1 | ||
debug = 1 | ||
lto = "fat" | ||
opt-level = 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opt-level and debug is already included in the default release profile and won't have any effect.
codegen-units = 1 | |
debug = 1 | |
lto = "fat" | |
opt-level = 3 | |
codegen-units = 1 | |
lto = "fat" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While opt-level is already 3 in release, the default for debug is 0:
https://doc.rust-lang.org/cargo/reference/profiles.html#release
debug = 1 has a minor improvement for cycle counts for me.
No description provided.