Skip to content

Fast path for processing some obligations in the new solver #141135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 22, 2025

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented May 17, 2025

Fast path applies to:

  • Dyn compatibility predicates
  • Region and type outlives predicates
  • Trivially sized predicates

@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels May 17, 2025
@compiler-errors
Copy link
Member 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 May 17, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request May 17, 2025
Fast path for processing some obligations in the new solver (volume 2)

r? `@ghost`
@bors
Copy link
Collaborator

bors commented May 17, 2025

⌛ Trying commit 57130ef with merge 669b833...

@bors
Copy link
Collaborator

bors commented May 17, 2025

☀️ Try build successful - checks-actions
Build commit: 669b833 (669b8332d9df13f6528286a1c780919c13039d27)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (669b833): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
0.7% [0.5%, 1.1%] 8
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.1% [-0.1%, -0.1%] 1
Improvements ✅
(secondary)
-2.0% [-4.4%, -0.3%] 12
All ❌✅ (primary) 0.6% [-0.1%, 1.1%] 9

Max RSS (memory usage)

Results (secondary -1.6%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.6% [-4.6%, -0.6%] 9
All ❌✅ (primary) - - 0

Cycles

Results (secondary -1.3%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.7% [0.5%, 0.8%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.4% [-3.5%, -0.6%] 10
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 774.898s -> 775.124s (0.03%)
Artifact size: 365.43 MiB -> 365.32 MiB (-0.03%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels May 17, 2025
@compiler-errors
Copy link
Member 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 May 18, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request May 18, 2025
Fast path for processing some obligations in the new solver (volume 2)

r? `@ghost`
@bors
Copy link
Collaborator

bors commented May 18, 2025

⌛ Trying commit c2ba69b with merge 46eba8e...

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented May 18, 2025

💔 Test failed - checks-actions

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 18, 2025
@compiler-errors
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented May 18, 2025

⌛ Trying commit 322224d with merge 3ecd0ba...

bors added a commit to rust-lang-ci/rust that referenced this pull request May 18, 2025
Fast path for processing some obligations in the new solver (volume 2)

r? `@ghost`
@compiler-errors
Copy link
Member Author

@rust-timer build 3ecd0ba

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3ecd0ba): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
2.1% [1.1%, 3.2%] 2
Regressions ❌
(secondary)
0.6% [0.6%, 0.6%] 1
Improvements ✅
(primary)
-0.1% [-0.1%, -0.1%] 1
Improvements ✅
(secondary)
-2.1% [-5.2%, -0.1%] 19
All ❌✅ (primary) 1.4% [-0.1%, 3.2%] 3

Max RSS (memory usage)

Results (secondary -1.4%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.5% [0.5%, 0.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.7% [-4.6%, -0.5%] 9
All ❌✅ (primary) - - 0

Cycles

Results (primary 2.8%, secondary -2.8%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.8% [2.8%, 2.8%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.8% [-5.7%, -0.8%] 14
All ❌✅ (primary) 2.8% [2.8%, 2.8%] 1

Binary size

Results (primary 1.1%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.1% [1.1%, 1.1%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.1% [1.1%, 1.1%] 1

Bootstrap: 777.393s -> 776.77s (-0.08%)
Artifact size: 365.45 MiB -> 365.32 MiB (-0.04%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 18, 2025
@compiler-errors compiler-errors marked this pull request as ready for review May 21, 2025 13:47
@compiler-errors
Copy link
Member Author

r? lcnr

@rustbot
Copy link
Collaborator

rustbot commented May 21, 2025

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 21, 2025
@compiler-errors compiler-errors changed the title Fast path for processing some obligations in the new solver (volume 2) Fast path for processing some obligations in the new solver May 21, 2025
@compiler-errors compiler-errors removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 21, 2025
@lcnr
Copy link
Contributor

lcnr commented May 22, 2025

@bors r+ rollup=never

@bors
Copy link
Collaborator

bors commented May 22, 2025

📌 Commit 407fac5 has been approved by lcnr

It is now in the queue for this repository.

@bors bors 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 May 22, 2025
@bors
Copy link
Collaborator

bors commented May 22, 2025

⌛ Testing commit 407fac5 with merge d423c81...

@bors
Copy link
Collaborator

bors commented May 22, 2025

☀️ Test successful - checks-actions
Approved by: lcnr
Pushing d423c81 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 22, 2025
@bors bors merged commit d423c81 into rust-lang:master May 22, 2025
7 checks passed
@rustbot rustbot added this to the 1.89.0 milestone May 22, 2025
Copy link

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 1d67944 (parent) -> d423c81 (this PR)

Test differences

Show 33260 test diffs

Stage 1

  • fmt::builders::debug_tuple::test_single: [missing] -> pass (J0)
  • io::buffered::tests::test_buffered_reader_read_to_end_consumes_buffer: [missing] -> pass (J0)
  • lazy::clone: [missing] -> pass (J0)
  • mutex::test_get_cloned_poison: [missing] -> pass (J0)
  • num::test_try_i32u8: [missing] -> pass (J0)
  • num::u8::test_rotate: [missing] -> pass (J0)
  • str::slice_index::boundary::range_2::index_mut_fail: [missing] -> pass (J0)
  • str::slice_index::rangeto_len::pass: [missing] -> pass (J0)
  • string::test_split_off_ascii: [missing] -> pass (J0)
  • sys_common::wtf8::tests::code_point_to_char: [missing] -> pass (J0)
  • thread::tests::test_try_panic_message_string_literal: [missing] -> pass (J0)
  • vec::test_slice_from_ref: [missing] -> pass (J0)
  • vec::test_split_off_take_all: [missing] -> pass (J0)
  • fs::tests::fchmod_works: [missing] -> pass (J1)
  • fs::tests::file_test_stat_is_correct_on_is_file: [missing] -> pass (J1)
  • num::flt2dec::strategy::dragon::bench_small_exact_inf: [missing] -> pass (J1)
  • num::int_sqrt::u64_sqrt_random: [missing] -> pass (J1)
  • slice::binary_search_l2_worst_case: [missing] -> pass (J1)
  • slice::random_inserts: [missing] -> pass (J1)
  • slice::sort_small_descending: [missing] -> pass (J1)
  • sort::tests::stable::correct_dyn_val_ascending: [missing] -> pass (J1)
  • sort::tests::stable::correct_string_random_d2: [missing] -> pass (J1)
  • sort::tests::stable::panic_observable_is_less_ascending: [missing] -> pass (J1)
  • sort::tests::stable::self_cmp_cell_i32_random: [missing] -> pass (J1)
  • sort::tests::unstable::correct_i32_narrow: [missing] -> pass (J1)
  • sort::tests::unstable::violate_ord_retain_orig_set_cell_i32_random: [missing] -> pass (J1)
  • errors::verify_ast_lowering_invalid_asm_template_modifier_const_16: [missing] -> pass (J2)
  • errors::verify_const_eval_unallowed_fn_pointer_call_9: [missing] -> pass (J2)
  • errors::verify_expand_expected_paren_or_brace_38: [missing] -> pass (J2)
  • errors::verify_incremental_no_path_4: [missing] -> pass (J2)
  • errors::verify_interface_mixed_proc_macro_crate_5: [missing] -> pass (J2)
  • errors::verify_metadata_empty_link_name_14: [missing] -> pass (J2)
  • errors::verify_metadata_no_link_mod_override_37: [missing] -> pass (J2)
  • errors::verify_mir_transform_fn_item_ref_7: [missing] -> pass (J2)
  • errors::verify_monomorphize_couldnt_dump_mono_stats_4: [missing] -> pass (J2)
  • graph::scc::tests::test_deep_linear: [missing] -> pass (J2)
  • html::render::sorted_template::tests::html_page: [missing] -> pass (J2)
  • lints::verify_lint_inner_macro_attribute_unstable_125: [missing] -> pass (J2)
  • lints::verify_lint_lintpass_by_hand_64: [missing] -> pass (J2)
  • parser::tests::multiple_labels_with_message: [missing] -> pass (J2)
  • parser::tests::string_to_tts_macro: [missing] -> pass (J2)
  • spec::tests::aarch64_kmc_solid_asp3: [missing] -> pass (J2)
  • spec::tests::riscv64gc_unknown_linux_musl: [missing] -> pass (J2)
  • test_diagonal_struct_match: [missing] -> pass (J2)
  • tests::single_edge: [missing] -> pass (J2)
  • tests::test_fn_like_macro_negative_literals: [missing] -> pass (J2)
  • sort::tests::stable::correct_string_random_d2: [missing] -> ignore (J3)
  • sort::tests::unstable::correct_i32_all_equal: [missing] -> ignore (J3)

Stage 2

  • clone::cstr_metadata_is_length_with_nul: pass -> [missing] (J0)
  • clone::test_clone_to_uninit_cstr: pass -> [missing] (J0)
  • collections::btree::map::tests::test_cursor_mut_insert_before_2: pass -> [missing] (J0)
  • collections::btree::map::tests::test_insert_into_full_height_1: pass -> [missing] (J0)
  • f32::test_atanh: pass -> [missing] (J0)
  • floats::f32::test_is_sign_positive: pass -> [missing] (J0)
  • io::tests::read_exact: pass -> [missing] (J0)
  • iter::adapters::map_windows::drop_checks::panic_in_middle: pass -> [missing] (J0)
  • lazy::lazy_new: pass -> [missing] (J0)
  • mpsc_sync::smoke_shared: pass -> [missing] (J0)
  • net::ip_addr::test_from_str_ipv4_in_ipv6: pass -> [missing] (J0)
  • num::test_try_u128u16: pass -> [missing] (J0)
  • num::test_try_u8i16: pass -> [missing] (J0)
  • num::wrapping::test_wrapping_u16: pass -> [missing] (J0)
  • option::test_copied: pass -> [missing] (J0)
  • option::test_unwrap_unchecked: pass -> [missing] (J0)
  • slice::test_last_mut: pass -> [missing] (J0)
  • slice::test_windows_nth: pass -> [missing] (J0)
  • str::test_join_issue_80335: pass -> [missing] (J0)
  • sync::test_clone_from_slice_panic: pass -> [missing] (J0)
  • test_env_set_get_huge: pass -> [missing] (J0)
  • test_next_power_of_two_u16: pass -> [missing] (J0)
  • time::debug_formatting_micros: pass -> [missing] (J0)
  • ascii::is_ascii::unaligned_both_long::case04_while_loop: pass -> [missing] (J1)
  • f16::test_log2: pass -> [missing] (J1)
  • hash::sip::bench_bytes_7: pass -> [missing] (J1)
  • iter::bench_enumerate_ref_sum: pass -> [missing] (J1)
  • net::tcp::tests::tcp_clone_smoke: pass -> [missing] (J1)
  • num::bench_u8_from_str_radix_10: pass -> [missing] (J1)
  • num::int_sqrt::u32_sqrt_random: pass -> [missing] (J1)
  • slice::iterator: pass -> [missing] (J1)
  • sort::tests::stable::self_cmp_i32_random: pass -> [missing] (J1)
  • sort::tests::unstable::panic_retain_orig_set_i32_saw_mixed: pass -> [missing] (J1)
  • stats::tests::test_norm25verynarrow: pass -> [missing] (J1)
  • stats::tests::test_pois25lambda50: pass -> [missing] (J1)
  • str::trim_end_ascii_char::short_pile_of_poo: pass -> [missing] (J1)
  • vec::bench_in_place_xu32_1000_i1: pass -> [missing] (J1)
  • deriving::coerce_pointee::verify_builtin_macros_coerce_pointee_requires_one_pointee_3: pass -> [missing] (J2)
  • error::verify_middle_layout_unknown_9: pass -> [missing] (J2)
  • errors::autodiff::verify_builtin_macros_autodiff_missing_config_26: pass -> [missing] (J2)
  • errors::verify_codegen_ssa_metadata_object_file_write_82: pass -> [missing] (J2)
  • errors::verify_parse_field_expression_with_generic_8: pass -> [missing] (J2)
  • errors::verify_passes_doc_test_unknown_any_44: pass -> [missing] (J2)
  • graph::dominators::tests::paper: pass -> [missing] (J2)
  • lints::verify_lint_invalid_reference_casting_borrow_as_mut_49: pass -> [missing] (J2)
  • lints::verify_lint_unused_builtin_attribute_135: pass -> [missing] (J2)
  • maybe_transmutable::tests::bool::transmute_u8: pass -> [missing] (J2)
  • parser::tests::look_ahead: pass -> [missing] (J2)
  • spec::tests::aarch64_unknown_linux_gnu_ilp32: pass -> [missing] (J2)
  • spec::tests::armebv7r_none_eabi: pass -> [missing] (J2)
  • spec::tests::riscv32imc_unknown_none_elf: pass -> [missing] (J2)
  • symbols::tests::test_symbols: pass -> [missing] (J2)

(and 16556 additional test diffs)

Additionally, 16604 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard d423c815a69bbcfb4abcd23a828b9a513c397632 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-apple-2: 1417.0s -> 6019.6s (324.8%)
  2. test-various: 2382.6s -> 4185.1s (75.7%)
  3. dist-aarch64-linux: 5616.9s -> 8126.7s (44.7%)
  4. x86_64-gnu-aux: 4664.2s -> 6272.2s (34.5%)
  5. dist-apple-various: 7380.0s -> 5466.0s (-25.9%)
  6. aarch64-apple: 3516.4s -> 4282.7s (21.8%)
  7. x86_64-apple-1: 5509.1s -> 6518.2s (18.3%)
  8. dist-x86_64-apple: 8926.1s -> 7382.4s (-17.3%)
  9. dist-ohos-armv7: 4339.6s -> 4705.1s (8.4%)
  10. dist-x86_64-illumos: 5559.8s -> 5955.0s (7.1%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d423c81): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-5.0%, -0.1%] 16
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -2.3%, secondary -3.9%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.3% [-2.3%, -2.3%] 1
Improvements ✅
(secondary)
-3.9% [-4.0%, -3.7%] 2
All ❌✅ (primary) -2.3% [-2.3%, -2.3%] 1

Cycles

Results (secondary -2.6%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.6% [-3.0%, -1.7%] 6
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 777.175s -> 776.699s (-0.06%)
Artifact size: 365.63 MiB -> 365.63 MiB (-0.00%)

@rustbot rustbot removed the perf-regression Performance regression. label May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants