mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 10:44:36 +08:00
Pin the hash seed in the execution benchmark harness (#9235)
Co-authored-by: CodSpeed Bot <no-reply@codspeed.io>
This commit is contained in:
1 parent
d495f1949b
commit
0edae7ca02
1 file changed
+3
@@ -44,6 +44,9 @@ fn bench_rustpython_code(b: &mut Bencher<'_>, name: &str, source: &str) {
|
||||
settings.path_list.push("Lib/".to_string());
|
||||
settings.write_bytecode = false;
|
||||
settings.user_site_directory = false;
|
||||
// Pin the str/bytes hash secret so dict/set probe sequences (and thus
|
||||
// timings) are reproducible across benchmark runs.
|
||||
settings.hash_seed = Some(0);
|
||||
let builder = Interpreter::builder(settings);
|
||||
let defs = rustpython_stdlib::stdlib_module_defs(&builder.ctx);
|
||||
builder.add_native_modules(&defs).build().enter(|vm| {
|
||||
|
||||
Reference in new issue
Block a user