Skip to content
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

Always inline traversal skeletons #124260

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eggyal
Copy link
Contributor

@eggyal eggyal commented Apr 22, 2024

These methods all just delegate to another part of the traversal machinery, but the compiler does not always select them for inlining which can give rise to missed optimisations.

Local perf on aarch64 shows mild/positive results, but obviously we should check on CI too.

r? wg-compiler-performance

These methods all just delegate to another part of the traversal
machinery, but the compiler does not always select them for inlining
which can give rise to missed optimisations.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 22, 2024
@compiler-errors
Copy link
Member

@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 Apr 22, 2024
@bors
Copy link
Contributor

bors commented Apr 22, 2024

⌛ Trying commit 1218ac2 with merge c2dfb80...

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 22, 2024
…=<try>

Always inline traversal skeletons

These methods all just delegate to another part of the traversal machinery, but the compiler does not always select them for inlining which can give rise to missed optimisations.

Local perf on aarch64 shows mild/positive results, but obviously we should check on CI too.

r? wg-compiler-performance
@bors
Copy link
Contributor

bors commented Apr 22, 2024

☀️ Try build successful - checks-actions
Build commit: c2dfb80 (c2dfb80d186780e87f513b88747b9dce16c216e6)

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c2dfb80): comparison URL.

Overall result: ❌ regressions - no action needed

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.

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

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.5% [0.4%, 0.9%] 7
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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

Cycles

Results

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.9% [-0.9%, -0.9%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.9% [-0.9%, -0.9%] 1

Binary size

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

Bootstrap: 671.419s -> 670.006s (-0.21%)
Artifact size: 315.41 MiB -> 315.43 MiB (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 22, 2024
@compiler-errors
Copy link
Member

Hm, perf doesn't seem helped much. I'm not surprised -- these methods are small enough that I'd expect the compiler to know to inline them already?

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants