-
Notifications
You must be signed in to change notification settings - Fork 156
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
Pool ActiveQuerys
in the query stack
#629
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for salsa-rs canceled.
|
CodSpeed Performance ReportMerging #629 will not alter performanceComparing Summary
|
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 |
…wind` This commit changes `Edge` such that it no longer takes direct ownership of the query stack and instead keeps a lifetime erased mutable slice, an exclusive borrow and as such the ownership model does not change. The caller now does have to uphold the safety invariant that the query stack borrow is life for the entire computation which is trivially achievable as the caller will block until the computation as done.
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
ActiveQuery
is 192 bytes and has a couple of collections within it (2 of which are not extract) that we can potentially re-use the allocations for. So pooling those instead of creating, pushing and popping the query from the stack might be beneficial to perf.Seems like we have small perf improvements.
Based on top of #626 (required for this)