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

Rust Toolchain: Upgrade to rust edition 2024 #42

Merged
merged 5 commits into from
Mar 11, 2025

Conversation

eval-exec
Copy link
Contributor

@eval-exec eval-exec commented Mar 6, 2025

warning: you seem to be trying to move all elements into a new `Vec`
   --> src/mmr.rs:501:5
    |
501 |     v.drain(..).collect()
    |     ^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(v)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#drain_collect
    = note: `#[warn(clippy::drain_collect)]` on by default
  • rust-toolchain: upgrade rust 2024
  • execute cargo fmt --all
  • set MSCV to 1.85.0

@eval-exec
Copy link
Contributor Author

Hello, @quake , please re-trigger the CI workflows.

…//rust-lang.github.io/rust-clippy/master/index.html#drain_collect

cargo clippy  --all --all-features --all-targets
warning: you seem to be trying to move all elements into a new `Vec`
   --> src/mmr.rs:501:5
    |
501 |     v.drain(..).collect()
    |     ^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(v)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#drain_collect
    = note: `#[warn(clippy::drain_collect)]` on by default

Signed-off-by: Eval EXEC <[email protected]>
@eval-exec eval-exec force-pushed the exec/upgrade-rust-2024 branch from 067d2d7 to ac82e86 Compare March 11, 2025 02:57
@eval-exec
Copy link
Contributor Author

eval-exec commented Mar 11, 2025

On Intel i9-14900K,
master branch:

     Running benches/helper_benchmark.rs (target/release/deps/helper_benchmark-b5e33b9f7196d37d)
Gnuplot not found, using plotters backend
left_index_to_pos       time:   [10.147 ns 10.167 ns 10.190 ns]
Found 7 outliers among 100 measurements (7.00%)
  3 (3.00%) high mild
  4 (4.00%) high severe

left_index_to_mmr_size  time:   [10.103 ns 10.125 ns 10.151 ns]
Found 6 outliers among 100 measurements (6.00%)
  2 (2.00%) high mild
  4 (4.00%) high severe

     Running benches/mmr_benchmark.rs (target/release/deps/mmr_benchmark-2b195913ce62bb0e)
Gnuplot not found, using plotters backend
MMR insertion/times/10000
                        time:   [4.8152 ms 4.8281 ms 4.8422 ms]
Found 1 outliers among 20 measurements (5.00%)
  1 (5.00%) high mild
MMR insertion/times/100000
                        time:   [55.335 ms 55.491 ms 55.668 ms]
Found 1 outliers among 20 measurements (5.00%)
  1 (5.00%) high mild
Benchmarking MMR insertion/times/1000000: Warming up for 3.0000 s
Warning: Unable to complete 20 samples in 5.0s. You may wish to increase target time to 11.8s, or reduce sample count to 10.
MMR insertion/times/1000000
                        time:   [577.75 ms 578.79 ms 580.09 ms]
Found 1 outliers among 20 measurements (5.00%)
  1 (5.00%) high mild

MMR gen proof           time:   [4.9548 µs 4.9666 µs 4.9824 µs]
Found 3 outliers among 20 measurements (15.00%)
  2 (10.00%) high mild
  1 (5.00%) high severe

MMR verify              time:   [3.7701 µs 3.7803 µs 3.7991 µs]
Found 2 outliers among 20 measurements (10.00%)
  1 (5.00%) high mild
  1 (5.00%) high severe

This PR:

     Running benches/helper_benchmark.rs (target/release/deps/helper_benchmark-e2502a0a9f6cdf94)
Gnuplot not found, using plotters backend
left_index_to_pos       time:   [10.093 ns 10.117 ns 10.146 ns]
                        change: [-0.3953% -0.0791% +0.2683%] (p = 0.66 > 0.05)
                        No change in performance detected.
Found 15 outliers among 100 measurements (15.00%)
  3 (3.00%) high mild
  12 (12.00%) high severe

left_index_to_mmr_size  time:   [9.9643 ns 9.9774 ns 9.9937 ns]
                        change: [-1.5135% -1.2727% -1.0323%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 11 outliers among 100 measurements (11.00%)
  1 (1.00%) low mild
  3 (3.00%) high mild
  7 (7.00%) high severe

     Running benches/mmr_benchmark.rs (target/release/deps/mmr_benchmark-f01489cae9dc3cf8)
Gnuplot not found, using plotters backend
MMR insertion/times/10000
                        time:   [4.7629 ms 4.7760 ms 4.7898 ms]
                        change: [-1.4198% -1.0147% -0.6417%] (p = 0.00 < 0.05)
                        Change within noise threshold.
MMR insertion/times/100000
                        time:   [54.792 ms 54.899 ms 55.013 ms]
                        change: [-1.4486% -1.0665% -0.7209%] (p = 0.00 < 0.05)
                        Change within noise threshold.
Benchmarking MMR insertion/times/1000000: Warming up for 3.0000 s
Warning: Unable to complete 20 samples in 5.0s. You may wish to increase target time to 11.6s, or reduce sample count to 10.
MMR insertion/times/1000000
                        time:   [573.59 ms 574.87 ms 576.32 ms]
                        change: [-0.9832% -0.6770% -0.3527%] (p = 0.00 < 0.05)
                        Change within noise threshold.
Found 1 outliers among 20 measurements (5.00%)
  1 (5.00%) high mild

MMR gen proof           time:   [4.8408 µs 4.8519 µs 4.8724 µs]
                        change: [-3.8207% -1.9915% -0.0372%] (p = 0.05 > 0.05)
                        No change in performance detected.
Found 2 outliers among 20 measurements (10.00%)
  1 (5.00%) high mild
  1 (5.00%) high severe

MMR verify              time:   [3.7542 µs 3.7672 µs 3.7917 µs]
                        change: [-2.9870% -0.5610% +1.8429%] (p = 0.67 > 0.05)
                        No change in performance detected.
Found 2 outliers among 20 measurements (10.00%)
  1 (5.00%) high mild
  1 (5.00%) high severe

@zhangsoledad zhangsoledad added this pull request to the merge queue Mar 11, 2025
Merged via the queue into nervosnetwork:master with commit 25c5d82 Mar 11, 2025
1 check passed
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