-
Notifications
You must be signed in to change notification settings - Fork 164
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
refactor(perf): Pool ActiveQuerys
in the query stack
#629
Conversation
✅ Deploy Preview for salsa-rs canceled.
|
CodSpeed Performance ReportMerging #629 will improve performances by 9.72%Comparing Summary
Benchmarks breakdown
|
ActiveQuerys
in the query stack
Do you have any perf numbers from ra that confirm the improvement? |
Not yet hence why I am fine with waiting on these PRs until salsa can be used for r-a as is so its easier for me to test |
acbb79e
to
e9f723b
Compare
Huh that's odd, all I did was rebase on latest master and now we have a perf regression? |
74e58b4
to
8a90d94
Compare
8a90d94
to
b3da8e1
Compare
okay locally I see (compared to #626:
|
Looking at the profiling graph in codspeed this regressions to come from different allocation behavior (within unrelated code), so I don't think this is a direct regression? |
Codspeed can be flaky at times but 22% suggest that there's something wrong. The |
It can be flaky but this report has been consistent across my 3 or so rebases earlier. My PR does change allocation patterns, so we might just be getting unlucky with the allocator here now. The |
b3da8e1
to
05f5469
Compare
Okay after fixing the benchmarks, this regression seems a lot more workable (and reasonable regarding my changes) |
05f5469
to
f4d973b
Compare
Okay my latest drain changes are the culprit for that one. I do want to say that this PR will generally regress perf over our benches as none of them do multiple queries in succession (which is where this PR shines), they tend to do one or two which means this PR strictly does more allocation work than before. |
f4d973b
to
f3f6cc4
Compare
f3f6cc4
to
5d9e78c
Compare
5d9e78c
to
c2e00ab
Compare
c2e00ab
to
7d0cb98
Compare
ActiveQuerys
in the query stackActiveQuerys
in the query stack
8f9c605
to
cdf040e
Compare
The regression is a bit confusing to me, I can't quite interpret it. It shouldn't be an allocation as the stack ought to have enough size at that point from the setup. But overall this seems to have some nice reductions |
07a84ba
to
f475f58
Compare
Alright figured out the cause of the regression, now its all green 🎉 |
facbe76
to
67c60c7
Compare
ActiveQuerys
in the query stackActiveQuerys
in the query stack
67c60c7
to
27312ba
Compare
27312ba
to
59912e8
Compare
ActiveQuery
is 192 bytes and has a couple of collections within it that we can potentially re-use the backing allocations for. So pooling those instead of creating, pushing and popping the query from the stack saves us from re-allocating unnecessarily in a bunch of cases.