-
Notifications
You must be signed in to change notification settings - Fork 8
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
Speed up incremental build #1682
base: main
Are you sure you want to change the base?
Conversation
ef99615
to
0caf013
Compare
@@ -0,0 +1,47 @@ | |||
pub mod nop; |
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.
This file moved here from the CLI.
circuits/tests/riscv_tests.rs
Outdated
@@ -44,10 +44,9 @@ macro_rules! test_elf { | |||
($test_name:ident, $file_name:tt) => { | |||
#[test] | |||
fn $test_name() -> Result<()> { | |||
run_test(include_bytes!(concat!( |
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.
Need to check whether reading the files at runtime actually improves build speed.
@@ -56,6 +57,7 @@ plonky2_crypto = { git = "https://github.com/0xmozak/plonky2-crypto.git" } | |||
criterion = { version = "0.5", default-features = false, features = ["html_reports", "plotters", "cargo_bench_support"] } | |||
|
|||
[patch.crates-io] | |||
clio = { git = "https://github.com/0xmozak/clio.git" } |
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.
This change can go into its own PR.
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.
I'm all for improving compilation speed but seems like this comes at the cost of reordering our CLI logic in a somewhat confusing manner, I'm not sure if args should belong outside of the cli.
circuits/tests/riscv_tests.rs
Outdated
let elf = fs::read(concat!("riscv-testdata/testdata/", $file_name)) | ||
.expect("Should have been able to read the file"); | ||
run_test(&elf) | ||
run_test(include_bytes!(concat!( |
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.
This probably adds compile time. rust-lang/rust#65818
Upgrade clio and remove a now-obsolete linter exception Extracted from #1682
Shuffle our code around a bit to speed up the incremental build.
Our target here is to make
time cargo test --no-run
run faster after a small change tocircuits
.At the moment on my machine this PR speeds that benchmark up from around 35s on
main
down to around15s
.