-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Performance regression (30%) between Rust 1.90 and 1.91 #153154
Copy link
Copy link
Open
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.Category: This is a bug.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.regression-untriagedUntriaged performance or correctness regression.Untriaged performance or correctness regression.
Description
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.Category: This is a bug.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.regression-untriagedUntriaged performance or correctness regression.Untriaged performance or correctness regression.
Type
Fields
Give feedbackNo fields configured for issues without a type.
We noticed a ~30% performance regression in our benchmarks when going from Rust 1.90 to Rust 1.91. The benchmarks were run on a Macbook Pro M4. The regression still seems to be present in nightly (2026-02-26).
Code
I created a minimized version of our benchmark, although not minimal. Let me know how I can refine it if needed. The code is available here (link points to the right branch). To notice the regression, compare running
between versions 1.90 and 1.91 (i.e. just changing the version in the
rust-toolchain.toml).On my Macbook Pro M4, Rust 1.90 yields
while on version 1.91,
Note that the performance is similar poor on nightly 2026-02-26,
Version it worked on
It most recently worked on: Rust 1.90,
rustc --version --verbose:Version with regression
rustc --version --verbose: