bump default max parallelism up to 20

This commit is contained in:
Ralf Jung 2025-02-05 09:44:43 +01:00
parent 7f95fa4cee
commit e58e3d5182

View file

@ -721,8 +721,8 @@ fn main() {
// Ensure we have parallelism for many-seeds mode.
if many_seeds.is_some() && !rustc_args.iter().any(|arg| arg.starts_with("-Zthreads=")) {
// Clamp to 10 threads; things get a lot less efficient beyond that due to lock contention.
let threads = std::thread::available_parallelism().map_or(1, |n| n.get()).min(10);
// Clamp to 20 threads; things get a less efficient beyond that due to lock contention.
let threads = std::thread::available_parallelism().map_or(1, |n| n.get()).min(20);
rustc_args.push(format!("-Zthreads={threads}"));
}
let many_seeds =