perf: Avoid intermediate allocations in nominal_obligations - #160473
perf: Avoid intermediate allocations in nominal_obligations#160473xmakro wants to merge 1 commit into
Conversation
34a56bf to
d5cbedd
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.
perf: Avoid intermediate allocations in nominal_obligations
|
The job Click to see the possible cause of the failure (guessed by this bot)Important For more information how to resolve CI failures of this job, visit this link. |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (682ed85): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. @bors rollup=never rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary -0.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 0.8%, secondary 0.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (secondary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 491.182s -> 490.219s (-0.20%) |
|
changes to the core type system cc @lcnr |
|
r? @jackh726 rustbot has assigned @jackh726. Use Why was this reviewer chosen?The reviewer was selected based on:
|
WfPredicates::nominal_obligationsbuilt a per-predicateVecof origins and a fully instantiatedInstantiatedPredicatesbefore collecting the result. Instead, this PR walks thepredicates_ofparent chain by recursion and instantiate each level directly into the result, which is allocated once with the exact size. Most items have no parent, so that case is handled innominal_obligationsinline, so this common path stays free of calls.