Skip to content

Pin the hash seed in the execution benchmark harness - #9235

Merged
youknowone merged 1 commit into
mainfrom
codspeed/bench-pin-execution-hash-seed
Oct 20, 2026
Merged

youknowone merged 1 commit into
mainfrom
codspeed/bench-pin-execution-hash-seed

Conversation

@codspeed

@codspeed codspeed Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Split out of #9224 at @fanninpm's request.

Change

bench_rustpython_code in benches/execution.rs now sets settings.hash_seed = Some(0). benches/microbenchmarks.rs has used the same setting since #9126.

Every RustPython interpreter in this harness is created by that function. The hash secret is set once per process, by the first interpreter, so all execution and pystone benchmarks now hash str/bytes the same way on every run. Dict and set probe sequences no longer change between runs.

Notes

  • Only benchmark code changes. Interpreter behaviour is the same.
  • cargo check --bench execution passes.
  • This does not stabilise parse_to_ast::*. Those benchmarks only run the ruff parser and never hash Python objects. Their swings come from the heap state that earlier benchmarks leave behind, and that depends on the HashMap iteration order in criterion_benchmark.

Comment @codspeedbot make the execution benchmarks run in a deterministic order and I'll add that to this PR.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: RustPython/RustPython/.coderabbit.yml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c86580d1-06ca-4beb-9dac-26fd14209f2f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@youknowone
youknowone marked this pull request as ready for review October 20, 2026 00:22
@youknowone
youknowone merged commit 0edae7c into main Oct 20, 2026
24 checks passed
@youknowone
youknowone deleted the codspeed/bench-pin-execution-hash-seed branch October 20, 2026 00:22
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T00:23:31.095550Z cf312e5 Draft marked ready
🔒 Security Review ✅ Completed 2026-10-20T00:24:46.925944Z cf312e5 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

2 participants