Skip to content

perf: avoid allocating HashSet in is_distinct check on small SwitchInts - #164969

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
panstromek:is-distinct-fast-path
Oct 29, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
panstromek:is-distinct-fast-path

Conversation

@panstromek

Copy link
Copy Markdown
Contributor

No description provided.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 26, 2026
@panstromek

Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 26, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 26, 2026
perf: avoid allocating HashSet in is_distinct check on small SwitchInts
@rust-bors

rust-bors Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 46f8fa0 (46f8fa0ae54824f38293297a0ed124bc4946b6ae)
Base parent: aaf324d (aaf324d50a7dcb17aae7f2a37e15ff143d980c6e)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (46f8fa0): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

@bors rollup=iffy rustc-perf
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.5%, -0.0%] 12
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 0.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.8% [0.5%, 1.4%] 12
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.9% [-5.4%, -0.5%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.3% [-5.4%, 1.4%] 14

Cycles

Results (primary -0.2%, secondary 0.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.8% [0.5%, 1.5%] 6
Regressions ❌
(secondary)
2.4% [0.8%, 4.1%] 2
Improvements ✅
(primary)
-0.8% [-1.4%, -0.4%] 10
Improvements ✅
(secondary)
-2.2% [-2.2%, -2.2%] 1
All ❌✅ (primary) -0.2% [-1.4%, 1.5%] 16

Binary size

Results (primary 0.1%, secondary 0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.2%] 67
Regressions ❌
(secondary)
0.1% [0.0%, 0.3%] 56
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [0.0%, 0.2%] 67

Bootstrap: 488.092s -> 488.091s (-0.00%)
Artifact size: 405.81 MiB -> 406.14 MiB (0.08%)

@panstromek

panstromek commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor Author

include-blob is noise.

Otherwise, the result is positive, but it's sadly not super visible. This code is only used in opt builds, because it's called by MatchBranchSimplification and JumpThreading MIR optimizations, so the relevant results are here: https://perf.rust-lang.org/compare.html?start=aaf324d50a7dcb17aae7f2a37e15ff143d980c6e&end=46f8fa0ae54824f38293297a0ed124bc4946b6ae&stat=instructions%3Au&clippy=false&check=false&debug=false&doc=false&doc-json=false&nonRelevant=true&incrUnchanged=false&incrPatched=false&incrFull=false

It's a bit unfortunate that for opt builds, almost everything is overshadowed by time spent in LLVM, so we can't easily measure small changes in there, it will end up below significance threshold.

When I run cachegrind diff on diesel, which is a benchmark that calls this function a lot (500k times), the result is pretty much exactly right:

-26,136,452 (100.0%)  PROGRAM TOTALS

  Ir________________________  function:file

> -9,129,848 (34.9%,  34.9%)  <hashbrown::map::HashMap<&rustc_middle::mir::BasicBlock, (), rustc_hash::FxBuildHasher>>::insert:
  -2,323,344  (8.9%)            /cargo/registry/25cdd57fae9f0462/hashbrown-0.17.1/src/map.rs
  -2,033,154  (7.8%)            /cargo/registry/25cdd57fae9f0462/hashbrown-0.17.1/src/raw.rs
  -1,160,760  (4.4%)            /cargo/registry/25cdd57fae9f0462/hashbrown-0.17.1/src/control/tag.rs
    -879,117  (3.4%)            /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/core/src/../../stdarch/crates/core_arch/src/x86/sse2.rs
    -580,380  (2.2%)            /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/core/src/num/uint_macros.rs
    -483,650  (1.9%)            /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/core/src/ptr/mod.rs
    -402,190  (1.5%)            /cargo/registry/25cdd57fae9f0462/hashbrown-0.17.1/src/control/bitmask.rs
    -388,136  (1.5%)            /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/core/src/intrinsics/mod.rs
    -293,838  (1.1%)            /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/core/src/ptr/mut_ptr.rs
    -290,190  (1.1%)            /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/core/src/macros/mod.rs
     -97,946  (0.4%)            /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/core/src/num/nonzero.rs
     -96,730  (0.4%)            /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/core/src/ub_checks.rs
     -96,730  (0.4%)            /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/core/src/convert/num.rs

> -4,028,190 (15.4%,  50.3%)  <hashbrown::raw::RawTable<(&rustc_middle::mir::BasicBlock, ())>>::reserve_rehash::<hashbrown::map::make_hasher<&rustc_middle::mir::BasicBlock, (), rustc_hash::FxBuildHasher>::{closure#0}>:
  -2,579,455  (9.9%)            /cargo/registry/25cdd57fae9f0462/hashbrown-0.17.1/src/raw.rs
    -459,355  (1.8%)            /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/core/src/num/uint_macros.rs
    -318,015  (1.2%)            /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/core/src/ptr/mod.rs
    -212,010  (0.8%)            /cargo/registry/25cdd57fae9f0462/hashbrown-0.17.1/src/alloc.rs
    -141,340  (0.5%)            /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/core/src/intrinsics/mod.rs
    -141,340  (0.5%)            /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/alloc/src/alloc.rs
     -70,670  (0.3%)            /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/core/src/cmp.rs
     -35,335  (0.1%)            /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/core/src/ub_checks.rs
     -35,335  (0.1%)            /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/core/src/ptr/mut_ptr.rs
     -35,335  (0.1%)            /cargo/registry/25cdd57fae9f0462/hashbrown-0.17.1/src/scopeguard.rs

> -1,972,066  (7.5%,  57.9%)  _int_free:./malloc/./malloc/malloc.c

> -1,683,275  (6.4%,  64.3%)  <core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::mir::BasicBlock>, <hashbrown::set::HashSet<&rustc_middle::mir::BasicBlock, rustc_hash::FxBuildHasher> as core::iter::traits::collect::Extend<&rustc_middle::mir::BasicBlock>>::extend<core::slice::iter::Iter<rustc_middle::mir::BasicBlock>>::{closure#0}> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<(&rustc_middle::mir::BasicBlock, ()), <hashbrown::map::HashMap<&rustc_middle::mir::BasicBlock, (), rustc_hash::FxBuildHasher> as core::iter::traits::collect::Extend<(&rustc_middle::mir::BasicBlock, ())>>::extend<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::mir::BasicBlock>, <hashbrown::set::HashSet<&rustc_middle::mir::BasicBlock, rustc_hash::FxBuildHasher> as core::iter::traits::collect::Extend<&rustc_middle::mir::BasicBlock>>::extend<core::slice::iter::Iter<rustc_middle::mir::BasicBlock>>::{closure#0}>>::{closure#0}>::{closure#0}>:
    -598,930  (2.3%)            /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/core/src/slice/iter/macros.rs
    -424,020  (1.6%)            /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/core/src/iter/adapters/map.rs
    -290,190  (1.1%)            /cargo/registry/25cdd57fae9f0462/hashbrown-0.17.1/src/map.rs
    -193,460  (0.7%)            /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/core/src/num/uint_macros.rs
    -141,340  (0.5%)            /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/core/src/ptr/const_ptr.rs
     -35,335  (0.1%)            /rustc/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/library/core/src/ptr/non_null.rs
...

@panstromek
panstromek marked this pull request as ready for review October 27, 2026 18:25
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 27, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 27, 2026
@rustbot

rustbot commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

r? @chenyukang

rustbot has assigned @chenyukang.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler, mir
  • compiler, mir expanded to 77 candidates
  • Random selection from 21 candidates

@tmiasko

tmiasko commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors

rust-bors Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f0974e1 has been approved by tmiasko

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 27, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 27, 2026
…r=tmiasko

perf: avoid allocating HashSet in is_distinct check on small SwitchInts
@JonathanBrouwer

JonathanBrouwer commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

As panstromek mentioned, include-blob perf is noise.
@bors rollup=maybe

(The diesel result looks good tho)

@panstromek

Copy link
Copy Markdown
Contributor Author

I should say the cachegrind diff is from local ./x perf run, so it looks nicer. The run with CI artifacts has a lot more unrelated inlining noise. The reductions are there but they show up elsewhere (where they get inlined in mir opt pass code).

rust-bors Bot pushed a commit that referenced this pull request Oct 28, 2026
…uwer

Rollup of 5 perf-sensitive pull requests

Successful merges:

 - #163525 (Move lang item collection to the resolver)
 - #164234 (New solver opts for `diesel` (part 2))
 - #164726 (perf: emit field names as a concatenated string in derive(Debug) for structs)
 - #164953 (Avoid stdlib's `impl Hash for Discriminant` for stable hashing)
 - #164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 28, 2026
…r=tmiasko

perf: avoid allocating HashSet in is_distinct check on small SwitchInts
rust-bors Bot pushed a commit that referenced this pull request Oct 28, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - #165032 (stdarch subtree update)
 - #165072 (Submodule update of rustc-perf)
 - #144090 (Make `IoSlice` and `IoSliceMut` methods unstably const)
 - #162342 (More stdarch regression tests)
 - #163909 (std: Test the exit behavior of `abort` and `abort_immediate`)
 - #164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`)
 - #164916 (CI: rfl: move job forward to Linux v7.3)
 - #164924 (Remove `TypeKind` from `rustc_codegen_ssa`)
 - #164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts)
 - #165083 (Gate `z` inline asm template modifier)
 - #165087 (Fix flaky CI test `named_temp_file_new_creates_file`)
 - #161131 (Check associated const binding types)
 - #161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic)
 - #164315 (make powerpc `Complex` ABI GCC-compatible)
 - #164476 (Avoid ICE on None from prepare_vtable_segments)
 - #164981 (Reflection add TypeId::name)
 - #165003 (follow up for global-alloc-reentry test)
 - #165020 (Bless mir-opt panic-abort tests)
 - #165066 (skip max_repr_align in Layout::eq_abi)
 - #165080 (Syntactically allow C-variadics in parenthesized argument lists)
 - #165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage)
 - #165082 (Remove stability note from `rust_splat`)
rust-bors Bot pushed a commit that referenced this pull request Oct 29, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - #165032 (stdarch subtree update)
 - #165072 (Submodule update of rustc-perf)
 - #144090 (Make `IoSlice` and `IoSliceMut` methods unstably const)
 - #162342 (More stdarch regression tests)
 - #163909 (std: Test the exit behavior of `abort` and `abort_immediate`)
 - #164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`)
 - #164916 (CI: rfl: move job forward to Linux v7.3)
 - #164924 (Remove `TypeKind` from `rustc_codegen_ssa`)
 - #164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts)
 - #165083 (Gate `z` inline asm template modifier)
 - #165087 (Fix flaky CI test `named_temp_file_new_creates_file`)
 - #161131 (Check associated const binding types)
 - #161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic)
 - #164315 (make powerpc `Complex` ABI GCC-compatible)
 - #164476 (Avoid ICE on None from prepare_vtable_segments)
 - #164981 (Reflection add TypeId::name)
 - #165003 (follow up for global-alloc-reentry test)
 - #165020 (Bless mir-opt panic-abort tests)
 - #165066 (skip max_repr_align in Layout::eq_abi)
 - #165080 (Syntactically allow C-variadics in parenthesized argument lists)
 - #165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage)
 - #165082 (Remove stability note from `rust_splat`)
rust-bors Bot pushed a commit that referenced this pull request Oct 29, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - #165032 (stdarch subtree update)
 - #165072 (Submodule update of rustc-perf)
 - #144090 (Make `IoSlice` and `IoSliceMut` methods unstably const)
 - #162342 (More stdarch regression tests)
 - #163909 (std: Test the exit behavior of `abort` and `abort_immediate`)
 - #164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`)
 - #164916 (CI: rfl: move job forward to Linux v7.3)
 - #164924 (Remove `TypeKind` from `rustc_codegen_ssa`)
 - #164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts)
 - #165083 (Gate `z` inline asm template modifier)
 - #165087 (Fix flaky CI test `named_temp_file_new_creates_file`)
 - #161131 (Check associated const binding types)
 - #161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic)
 - #164315 (make powerpc `Complex` ABI GCC-compatible)
 - #164476 (Avoid ICE on None from prepare_vtable_segments)
 - #164981 (Reflection add TypeId::name)
 - #165003 (follow up for global-alloc-reentry test)
 - #165020 (Bless mir-opt panic-abort tests)
 - #165066 (skip max_repr_align in Layout::eq_abi)
 - #165080 (Syntactically allow C-variadics in parenthesized argument lists)
 - #165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage)
 - #165082 (Remove stability note from `rust_splat`)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 29, 2026
…r=tmiasko

perf: avoid allocating HashSet in is_distinct check on small SwitchInts
rust-bors Bot pushed a commit that referenced this pull request Oct 29, 2026
…uwer

Rollup of 23 pull requests

Successful merges:

 - #165032 (stdarch subtree update)
 - #165072 (Submodule update of rustc-perf)
 - #144090 (Make `IoSlice` and `IoSliceMut` methods unstably const)
 - #162342 (More stdarch regression tests)
 - #163909 (std: Test the exit behavior of `abort` and `abort_immediate`)
 - #164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`)
 - #164916 (CI: rfl: move job forward to Linux v7.3)
 - #164924 (Remove `TypeKind` from `rustc_codegen_ssa`)
 - #164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts)
 - #165083 (Gate `z` inline asm template modifier)
 - #165087 (Fix flaky CI test `named_temp_file_new_creates_file`)
 - #165123 (Temporarily drop macos-26 jobs)
 - #161131 (Check associated const binding types)
 - #161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic)
 - #164315 (make powerpc `Complex` ABI GCC-compatible)
 - #164476 (Avoid ICE on None from prepare_vtable_segments)
 - #164981 (Reflection add TypeId::name)
 - #165003 (follow up for global-alloc-reentry test)
 - #165020 (Bless mir-opt panic-abort tests)
 - #165066 (skip max_repr_align in Layout::eq_abi)
 - #165080 (Syntactically allow C-variadics in parenthesized argument lists)
 - #165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage)
 - #165082 (Remove stability note from `rust_splat`)
rust-bors Bot pushed a commit that referenced this pull request Oct 29, 2026
…uwer

Rollup of 23 pull requests

Successful merges:

 - #165032 (stdarch subtree update)
 - #165072 (Submodule update of rustc-perf)
 - #144090 (Make `IoSlice` and `IoSliceMut` methods unstably const)
 - #162342 (More stdarch regression tests)
 - #163909 (std: Test the exit behavior of `abort` and `abort_immediate`)
 - #164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`)
 - #164916 (CI: rfl: move job forward to Linux v7.3)
 - #164924 (Remove `TypeKind` from `rustc_codegen_ssa`)
 - #164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts)
 - #165083 (Gate `z` inline asm template modifier)
 - #165087 (Fix flaky CI test `named_temp_file_new_creates_file`)
 - #165123 (Temporarily drop macos-26 jobs)
 - #161131 (Check associated const binding types)
 - #161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic)
 - #164315 (make powerpc `Complex` ABI GCC-compatible)
 - #164476 (Avoid ICE on None from prepare_vtable_segments)
 - #164981 (Reflection add TypeId::name)
 - #165003 (follow up for global-alloc-reentry test)
 - #165020 (Bless mir-opt panic-abort tests)
 - #165066 (skip max_repr_align in Layout::eq_abi)
 - #165080 (Syntactically allow C-variadics in parenthesized argument lists)
 - #165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage)
 - #165082 (Remove stability note from `rust_splat`)
rust-bors Bot pushed a commit that referenced this pull request Oct 29, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - #165032 (stdarch subtree update)
 - #165123 (Temporarily drop macos-26 jobs)
 - #165072 (Submodule update of rustc-perf)
 - #144090 (Make `IoSlice` and `IoSliceMut` methods unstably const)
 - #162342 (More stdarch regression tests)
 - #163909 (std: Test the exit behavior of `abort` and `abort_immediate`)
 - #164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`)
 - #164916 (CI: rfl: move job forward to Linux v7.3)
 - #164924 (Remove `TypeKind` from `rustc_codegen_ssa`)
 - #164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts)
 - #165083 (Gate `z` inline asm template modifier)
 - #165087 (Fix flaky CI test `named_temp_file_new_creates_file`)
 - #161131 (Check associated const binding types)
 - #161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic)
 - #164315 (make powerpc `Complex` ABI GCC-compatible)
 - #164476 (Avoid ICE on None from prepare_vtable_segments)
 - #165003 (follow up for global-alloc-reentry test)
 - #165020 (Bless mir-opt panic-abort tests)
 - #165066 (skip max_repr_align in Layout::eq_abi)
 - #165080 (Syntactically allow C-variadics in parenthesized argument lists)
 - #165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage)
 - #165082 (Remove stability note from `rust_splat`)
@rust-bors
rust-bors Bot merged commit e9a828c into rust-lang:main Oct 29, 2026
15 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Oct 29, 2026
rust-bors Bot pushed a commit that referenced this pull request Oct 29, 2026
Rollup merge of #164969 - panstromek:is-distinct-fast-path, r=tmiasko

perf: avoid allocating HashSet in is_distinct check on small SwitchInts
hashcatHitman pushed a commit to hashcatHitman/miri that referenced this pull request Oct 30, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - rust-lang/rust#165032 (stdarch subtree update)
 - rust-lang/rust#165123 (Temporarily drop macos-26 jobs)
 - rust-lang/rust#165072 (Submodule update of rustc-perf)
 - rust-lang/rust#144090 (Make `IoSlice` and `IoSliceMut` methods unstably const)
 - rust-lang/rust#162342 (More stdarch regression tests)
 - rust-lang/rust#163909 (std: Test the exit behavior of `abort` and `abort_immediate`)
 - rust-lang/rust#164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`)
 - rust-lang/rust#164916 (CI: rfl: move job forward to Linux v7.3)
 - rust-lang/rust#164924 (Remove `TypeKind` from `rustc_codegen_ssa`)
 - rust-lang/rust#164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts)
 - rust-lang/rust#165083 (Gate `z` inline asm template modifier)
 - rust-lang/rust#165087 (Fix flaky CI test `named_temp_file_new_creates_file`)
 - rust-lang/rust#161131 (Check associated const binding types)
 - rust-lang/rust#161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic)
 - rust-lang/rust#164315 (make powerpc `Complex` ABI GCC-compatible)
 - rust-lang/rust#164476 (Avoid ICE on None from prepare_vtable_segments)
 - rust-lang/rust#165003 (follow up for global-alloc-reentry test)
 - rust-lang/rust#165020 (Bless mir-opt panic-abort tests)
 - rust-lang/rust#165066 (skip max_repr_align in Layout::eq_abi)
 - rust-lang/rust#165080 (Syntactically allow C-variadics in parenthesized argument lists)
 - rust-lang/rust#165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage)
 - rust-lang/rust#165082 (Remove stability note from `rust_splat`)
BenMac31 pushed a commit to graphide-oss/rust-analyzer that referenced this pull request Nov 2, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - rust-lang/rust#165032 (stdarch subtree update)
 - rust-lang/rust#165123 (Temporarily drop macos-26 jobs)
 - rust-lang/rust#165072 (Submodule update of rustc-perf)
 - rust-lang/rust#144090 (Make `IoSlice` and `IoSliceMut` methods unstably const)
 - rust-lang/rust#162342 (More stdarch regression tests)
 - rust-lang/rust#163909 (std: Test the exit behavior of `abort` and `abort_immediate`)
 - rust-lang/rust#164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`)
 - rust-lang/rust#164916 (CI: rfl: move job forward to Linux v7.3)
 - rust-lang/rust#164924 (Remove `TypeKind` from `rustc_codegen_ssa`)
 - rust-lang/rust#164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts)
 - rust-lang/rust#165083 (Gate `z` inline asm template modifier)
 - rust-lang/rust#165087 (Fix flaky CI test `named_temp_file_new_creates_file`)
 - rust-lang/rust#161131 (Check associated const binding types)
 - rust-lang/rust#161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic)
 - rust-lang/rust#164315 (make powerpc `Complex` ABI GCC-compatible)
 - rust-lang/rust#164476 (Avoid ICE on None from prepare_vtable_segments)
 - rust-lang/rust#165003 (follow up for global-alloc-reentry test)
 - rust-lang/rust#165020 (Bless mir-opt panic-abort tests)
 - rust-lang/rust#165066 (skip max_repr_align in Layout::eq_abi)
 - rust-lang/rust#165080 (Syntactically allow C-variadics in parenthesized argument lists)
 - rust-lang/rust#165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage)
 - rust-lang/rust#165082 (Remove stability note from `rust_splat`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. S-waiting-on-perf Status: Waiting on a perf run to be completed. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants