Skip to content

Commit

Permalink
Auto merge of rust-lang#3387 - RalfJung:bench, r=RalfJung
Browse files Browse the repository at this point in the history
make 'invalidate' benchmark shorter

This is currently by far the slowest benchmark in our suite, taking >9s, when the second slowest takes 2.7s. So let's speed this up to 2.3s, making it still the second-slowest in the benchmark suite.

`@saethlin` any objections? Also, why is this called "invalidate"? It got added in rust-lang/miri#3083 but I can't figure out the point of that name even after looking at the PR.^^ There should be a comment in the benchmark explaining what it is testing.
  • Loading branch information
bors committed Mar 18, 2024
2 parents d7864d2 + 311024c commit b648a9a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
version = 3

[[package]]
name = "invalidate"
name = "range-iteration"
version = "0.1.0"
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "invalidate"
name = "range-iteration"
version = "0.1.0"
edition = "2021"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! 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..200_000 {}
for _ in 0..50_000 {}
}

0 comments on commit b648a9a

Please sign in to comment.