Repository navigation
rustc_type_ir: Optimize sub_root_lookup_table by using SsoHashMap, not HashMap - #166078
Conversation
|
r? @fmease rustbot has assigned @fmease. Use Why was this reviewer chosen?The reviewer was selected based on:
|
e712964 to
171bfe2
Compare
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…r=<try> rustc_type_ir: Optimize `sub_root_lookup_table` by using `SsoHashMap`, not `HashMap`
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…, not `HashMap` `sub_root_lookup_table` struct member is a `SsoHashMap` in `compiler/rustc_infer/src/infer/canonical/canonicalizer.rs`, but in rustc_type_ir it has been a bare `HashMap`. As far as I understand, it's going to likewise almost always have only few elements at most, so let's try to do small-buffer optimization here too by making this struct member a `SsoHashMap`.
171bfe2 to
3333750
Compare
|
Finished benchmarking commit (3283ad0): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @rustbot label: -S-waiting-on-perf -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -1.6%, secondary 0.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -0.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 465.336s -> 466.46s (0.24%) |
…xhash_sbo, r=fmease rustc_type_ir: Optimize `sub_root_lookup_table` by using `SsoHashMap`, not `HashMap` `sub_root_lookup_table` member is a `SsoHashMap` in `compiler/rustc_infer/src/infer/canonical/canonicalizer.rs`, but in rustc_type_ir it has been a bare `HashMap`. As far as I understand, it's going to likewise almost always have only few elements at most, so let's try to do small-buffer optimization here too by making this struct member a `SsoHashMap`.
…uwer Rollup of 16 pull requests Successful merges: - #166078 (rustc_type_ir: Optimize `sub_root_lookup_table` by using `SsoHashMap`, not `HashMap`) - #165934 (Avoid using Terminator:None in simplify_cfg) - #166050 (Use attribute parser for lang attributes in `LateResolutionVisitor`) - #166117 (Remove ebadf handling from stdio) - #166119 (Avoid an ICE on re-exports of private imports without a DefId) - #165094 (reflection: doc attributes from adts, fields, and variants) - #165216 (Clearer diagnostics when `&FnOnce` was provided when `FnOnce` was expected) - #165694 (view-types: make sure view types are !Sized) - #165883 (Report a recursion limit error instead of delaying a bug in RPITIT collector) - #165971 (fix: non-deterministic temporary object paths in linker maps) - #166064 (Add const generic transmute min support) - #166136 (Move ub_checks() inside the const_eval_select branch.) - #166166 (Don't recover if not allowed in `parse_seq_to_before_tokens`) - #166176 (compiletest: Move all code out of the crate root) - #166185 (simd-test: Fix cfg syntax in the test macro) - #166194 (std: Unstably constify `std::process::abort`) Failed merges: - #166150 (Reflection: refactor Type and TypeKind) - #166160 (refactor CTFE-specific intrinsics to different file)
This comment has been minimized.
This comment has been minimized.
|
A job failed! Check out the build log: (web) (plain enhanced) (plain) Click to see the possible cause of the failure (guessed by this bot) |
|
Finished benchmarking commit (4b5350e): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -0.1%, secondary 0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -0.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 458.85s -> 458.821s (-0.01%) |
sub_root_lookup_tablemember is aSsoHashMapincompiler/rustc_infer/src/infer/canonical/canonicalizer.rs, but in rustc_type_ir it has been a bareHashMap. As far as I understand, it's going to likewise almost always have only few elements at most, so let's try to do small-buffer optimization here too by making this struct member aSsoHashMap.