Skip to content

Conversation

yotamofek
Copy link
Contributor

This showed up in a profile I was looking at, hoping this might improve perf by a little bit.

@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 15, 2025
@yotamofek yotamofek marked this pull request as ready for review October 15, 2025 19:17
@rustbot
Copy link
Collaborator

rustbot commented Oct 15, 2025

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 15, 2025
@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 15, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 15, 2025

r? @davidtwco

rustbot has assigned @davidtwco.
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

@JonathanBrouwer
Copy link
Contributor

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 15, 2025
Micro-optimization in `FunctionCx::initialize_locals`
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 15, 2025
@rust-bors
Copy link

rust-bors bot commented Oct 15, 2025

☀️ Try build successful (CI)
Build commit: 5b26667 (5b2666713c0320f62e357a7c134d7b62824b2daa, parent: 28d0a4a205f9e511ad2f51ee79a4aa19a704a455)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5b26667): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

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

Instruction count

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

Max RSS (memory usage)

Results (primary -4.3%, secondary -3.0%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-4.3% [-6.4%, -2.2%] 2
Improvements ✅
(secondary)
-3.0% [-3.0%, -2.9%] 2
All ❌✅ (primary) -4.3% [-6.4%, -2.2%] 2

Cycles

Results (secondary 2.3%)

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

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

Binary size

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

Bootstrap: 474.854s -> 476.04s (0.25%)
Artifact size: 388.09 MiB -> 388.00 MiB (-0.02%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 16, 2025
@yotamofek
Copy link
Contributor Author

Doesn't make a dent in instruction counts, but reduces max RSS in some cases - which makes sense. So I think it's still worth merging.

@JonathanBrouwer
Copy link
Contributor

JonathanBrouwer commented Oct 16, 2025

I'm not entirely convinced that the max RSS isn't just noise, but I think the new code is easier to read anyways, so lets merge this

@bors r+ rollup=iffy
Since this may have some effect on performance this maybe shouldn't be rolled up? It's probably fine tho since its so minimal

@bors
Copy link
Collaborator

bors commented Oct 16, 2025

📌 Commit 9361d64 has been approved by JonathanBrouwer

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 Oct 16, 2025
samueltardieu added a commit to samueltardieu/rust that referenced this pull request Oct 17, 2025
…_opt, r=JonathanBrouwer Micro-optimization in `FunctionCx::initialize_locals` This showed up in a profile I was looking at, hoping this might improve perf by a little bit.
bors added a commit that referenced this pull request Oct 17, 2025
Rollup of 6 pull requests Successful merges: - #144936 (CFI: Fix types that implement Fn, FnMut, or FnOnce) - #147468 (Implement fs api set_times and set_times_nofollow) - #147660 (rustdoc-search: stringdex 0.0.2) - #147735 (Micro-optimization in `FunctionCx::initialize_locals`) - #147764 (Undo CopyForDeref assertion in const qualif) - #147783 (bootstrap: migrate to object 0.37) r? `@ghost` `@rustbot` modify labels: rollup
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

6 participants