-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
make query caches use Sharded
only for multiple threads
#115162
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 16b9941 with merge c5169d918670de7b50199e90a38e96c2aa1d4bc2... |
Sharded
only for multiple threads
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
@@ -382,19 +433,19 @@ macro_rules! define_callbacks { | |||
#[inline(always)] | |||
pub fn $name(self, key: query_helper_param_ty!($($K)*)) -> $V | |||
{ | |||
restore::<$V>(query_get_at( | |||
restore::<$V>(with_query_caches!(query_get_at( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is probably a bit costly as is doubles the size of the query accessor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I added likely
hint here, maybe helps a lillte
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That doesn't really affect the code size.
I did a benchmark run for this PR with
|
Yea I don't know why rustc-perf makes this PR starves. I gonna try use |
@Zoxc Could you help test the perf again? If the performace not as good as your local test, it is very good. It means we can fetch better performace than previous work |
This comment has been minimized.
This comment has been minimized.
614d65a
to
cd6850c
Compare
Finished benchmarking commit (c5169d918670de7b50199e90a38e96c2aa1d4bc2): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking 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 Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 631.241s -> 631.856s (0.10%) |
☔ The latest upstream changes (presumably #115198) made this pull request unmergeable. Please resolve the merge conflicts. |
Switching to waiting on author to resolve conflicts. I'm reading this comment: do the latest perf. run results align with your expectations? Feel free to request a review with @rustbot author |
Close this since we already had better solutions |
This PR make query caches use
Sharded
only for multiple threads. This can improve spatial locality in single-threaded scenarios to improve performancecc @Zoxc
r? @cjgillot