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

Perf: Optimize guest builds #130

Merged
merged 4 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions guests/reth-ethereum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ edition = "2021"

[workspace]

[profile.dev]
opt-level = 3

[profile.dev.build-override]
opt-level = 3
Copy link
Member

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

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.


[profile.release]
debug = 1
lto = true

[profile.release.build-override]
opt-level = 3

[dependencies.risc0-zkvm]
git = "https://github.com/risc0/risc0"
rev = "e98cdad96cfecb3d959cb62abf566e5b17a0d649"
Expand Down
13 changes: 13 additions & 0 deletions guests/reth-optimism/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ edition = "2021"

[workspace]

[profile.dev]
opt-level = 3

[profile.dev.build-override]
opt-level = 3

[profile.release]
debug = 1
lto = true

[profile.release.build-override]
opt-level = 3

[dependencies.risc0-zkvm]
git = "https://github.com/risc0/risc0"
rev = "e98cdad96cfecb3d959cb62abf566e5b17a0d649"
Expand Down
Loading