Skip to content

Abolish QueryVTable in favour of more assoc items on QueryConfig #106307

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 1 commit into from
Jan 2, 2023

Conversation

Noratrieb
Copy link
Member

This may introduce additional mono but may help const fold things better and especially may help not constructing a QueryVTable anymore which is cheap but not free.

@rustbot
Copy link
Collaborator

rustbot commented Dec 30, 2022

r? @oli-obk

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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 Dec 30, 2022
@Noratrieb
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 Dec 30, 2022
@bors
Copy link
Collaborator

bors commented Dec 30, 2022

⌛ Trying commit 6a3322f82d418c6636a59cb8a972a79fd7e6ca2c with merge f6adf0eb399990bfcacd1f93ed3fce44ec056328...

@jyn514
Copy link
Member

jyn514 commented Dec 30, 2022

r? @jyn514

Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me, I would be very interested to see whether this makes try_load_from_disk_and_cache_in_memory heavier or lighter (that's the third-heaviest function in #65031 (comment)).

@bors
Copy link
Collaborator

bors commented Dec 31, 2022

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f6adf0eb399990bfcacd1f93ed3fce44ec056328): comparison URL.

Overall result: ✅ improvements - 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.2%, 0.7%] 6
Improvements ✅
(primary)
-0.5% [-0.8%, -0.2%] 50
Improvements ✅
(secondary)
-0.5% [-0.9%, -0.1%] 63
All ❌✅ (primary) -0.5% [-0.8%, -0.2%] 50

Max RSS (memory usage)

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)
2.7% [2.4%, 3.2%] 4
Regressions ❌
(secondary)
2.3% [0.6%, 4.2%] 44
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.4% [-5.4%, -5.4%] 1
All ❌✅ (primary) 2.7% [2.4%, 3.2%] 4

Cycles

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

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 31, 2022
@jyn514
Copy link
Member

jyn514 commented Dec 31, 2022

apparently this makes rustc_query_impl faster to compile ???

I'm not complaining lol

@jyn514
Copy link
Member

jyn514 commented Dec 31, 2022

r=me with #106307 (comment) fixed :)

@jyn514 jyn514 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 Dec 31, 2022
@Noratrieb Noratrieb marked this pull request as ready for review December 31, 2022 10:44
@cjgillot
Copy link
Contributor

The compiler got faster. Do you have an idea why? Better optimizations thanks to const propagation?

@Noratrieb
Copy link
Member Author

Probably this and also less time spent assembling a QueryVTable, which isn't expensive but also not free.

@Noratrieb
Copy link
Member Author

@bors r=jyn514

@bors
Copy link
Collaborator

bors commented Dec 31, 2022

📌 Commit ab52170557766931f24274dc76ed5bec38b59122 has been approved by jyn514

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 31, 2022
@Noratrieb
Copy link
Member Author

@bors r- i'll address the review feedback first

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 31, 2022
@Noratrieb
Copy link
Member Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 31, 2022
@jyn514
Copy link
Member

jyn514 commented Dec 31, 2022

r? @cjgillot

@rustbot rustbot assigned cjgillot and unassigned jyn514 Dec 31, 2022
This may introduce additional mono _but_ may help const fold things
better and especially may help not constructing a `QueryVTable` anymore
which is cheap but not free.
@cjgillot
Copy link
Contributor

cjgillot commented Jan 2, 2023

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 2, 2023

📌 Commit 9fe4efe has been approved by cjgillot

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 Jan 2, 2023
@bors
Copy link
Collaborator

bors commented Jan 2, 2023

⌛ Testing commit 9fe4efe with merge d6f99e5...

@bors
Copy link
Collaborator

bors commented Jan 2, 2023

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing d6f99e5 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 2, 2023
@bors bors merged commit d6f99e5 into rust-lang:master Jan 2, 2023
@rustbot rustbot added this to the 1.68.0 milestone Jan 2, 2023
@Noratrieb Noratrieb deleted the dynamic->static branch January 2, 2023 23:20
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d6f99e5): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -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.6% [0.4%, 1.0%] 4
Improvements ✅
(primary)
-0.5% [-1.0%, -0.2%] 63
Improvements ✅
(secondary)
-0.6% [-1.3%, -0.4%] 60
All ❌✅ (primary) -0.5% [-1.0%, -0.2%] 63

Max RSS (memory usage)

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

Cycles

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants