rust-lang / rust-lang/rust

`-Zthreads` is slower the more cores I add

Open
#129,236 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

S-needs-repro WG-compiler-performance
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

In my crates I haven't actually gotten a speedup from more threads. In fact, quite the opposite!
The more threads I add the slower it becomes, 1 being the fastest.

rustc --version
rustc 1.82.0-nightly (91376f416 2024-08-12)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin by reproducing the report with rustc 1.82.0-nightly (91376f416 2024-08-12), varying -Zthreads on a minimal crate and measuring compilation time. The issue names no crate, command, source file, or test, so first establish a concrete reproduction and trace the compiler phase responsible before determining what a fix or regression test should cover.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.