From 34c65ddc727b8208ba77c44d08083deddd66e572 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 17 Mar 2024 14:30:03 +0100 Subject: [PATCH 1/2] make 'invalidate' benchmark shorter --- bench-cargo-miri/invalidate/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bench-cargo-miri/invalidate/src/main.rs b/bench-cargo-miri/invalidate/src/main.rs index fa8deb851c..42492b1a88 100644 --- a/bench-cargo-miri/invalidate/src/main.rs +++ b/bench-cargo-miri/invalidate/src/main.rs @@ -1,4 +1,4 @@ fn main() { // The end of the range is just chosen to make the benchmark run for a few seconds. - for _ in 0..200_000 {} + for _ in 0..50_000 {} } From b3481a48684f98de19f45678b37bb944da358808 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 18 Mar 2024 08:59:19 +0100 Subject: [PATCH 2/2] rename 'invalidate' bench to something more clear --- bench-cargo-miri/{invalidate => range-iteration}/Cargo.lock | 2 +- bench-cargo-miri/{invalidate => range-iteration}/Cargo.toml | 2 +- bench-cargo-miri/{invalidate => range-iteration}/src/main.rs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) rename bench-cargo-miri/{invalidate => range-iteration}/Cargo.lock (84%) rename bench-cargo-miri/{invalidate => range-iteration}/Cargo.toml (86%) rename bench-cargo-miri/{invalidate => range-iteration}/src/main.rs (66%) diff --git a/bench-cargo-miri/invalidate/Cargo.lock b/bench-cargo-miri/range-iteration/Cargo.lock similarity index 84% rename from bench-cargo-miri/invalidate/Cargo.lock rename to bench-cargo-miri/range-iteration/Cargo.lock index 7bf23225ea..2a5f8f3225 100644 --- a/bench-cargo-miri/invalidate/Cargo.lock +++ b/bench-cargo-miri/range-iteration/Cargo.lock @@ -3,5 +3,5 @@ version = 3 [[package]] -name = "invalidate" +name = "range-iteration" version = "0.1.0" diff --git a/bench-cargo-miri/invalidate/Cargo.toml b/bench-cargo-miri/range-iteration/Cargo.toml similarity index 86% rename from bench-cargo-miri/invalidate/Cargo.toml rename to bench-cargo-miri/range-iteration/Cargo.toml index 14cf0882f0..3f0146f625 100644 --- a/bench-cargo-miri/invalidate/Cargo.toml +++ b/bench-cargo-miri/range-iteration/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "invalidate" +name = "range-iteration" version = "0.1.0" edition = "2021" diff --git a/bench-cargo-miri/invalidate/src/main.rs b/bench-cargo-miri/range-iteration/src/main.rs similarity index 66% rename from bench-cargo-miri/invalidate/src/main.rs rename to bench-cargo-miri/range-iteration/src/main.rs index 42492b1a88..1ef35ee6b3 100644 --- a/bench-cargo-miri/invalidate/src/main.rs +++ b/bench-cargo-miri/range-iteration/src/main.rs @@ -1,3 +1,4 @@ +//! This generates a lot of work for the AllocId part of the GC. fn main() { // The end of the range is just chosen to make the benchmark run for a few seconds. for _ in 0..50_000 {}