-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
copied().min() performance regression on nightly #140207
Copy link
Copy link
Closed
Labels
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-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Metadata
Metadata
Assignees
Labels
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-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Code
I tried this code (godbolt, from this video):
I expected to see this happen: compiles to
vphminposuwx86 instruction (+avx feature)Instead, this happened: compiles to unrolled cmp + cmov
Note that a manual
minloop is unaffected, even with the slice iterator:Version it worked on
It most recently worked on: 1.86
Version with regression
rustc --version --verbose:@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged
searched nightlies: from nightly-2025-02-15 to nightly-2025-04-23
regressed nightly: nightly-2025-04-16
searched commit range: 2da29db...38c560a
regressed commit: 58c2dd9
Weirdly: #139745 cc @thaliaarchi
bisected with cargo-bisect-rustc v0.6.9
Host triple: x86_64-unknown-linux-gnu
Reproduce with: