-
Notifications
You must be signed in to change notification settings - Fork 13.8k
TaskDeps
improvements
#147508
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
base: master
Are you sure you want to change the base?
TaskDeps
improvements
#147508
Conversation
There are only two places that create a `TaskDeps`. One constructs it manually, the other uses `default`. It's weird that `default()` uses a capacity of 128. This commit just gets rid of `default` and introduces `new` so that both construction sites can be equivalent.
`INLINE_CAPACITY` has two different uses: - It dictates the inline capacity of `EdgesVec::edges`, which is a `SmallVec`. - It dictates when `TaskDeps` switches from a linear scan lookup to a hashset lookup to determine if an edge has been seen before. These two uses are in the same part of the code, but they're fundamentally separate and don't need to use the same constant. This commit separates the two uses, and adds some helpful comments, making the code clearer. It also changes the value used for the linear/hashset threshold from 8 to 16, which gives slightly better perf.
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
💥 Test timed out after |
@bors retry |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (e4658cf): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -0.8%, secondary 0.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -1.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 472.277s -> 472.516s (0.05%) |
I'm a bit surprised by the mix of perf improvements and regressions. Locally I saw almost universal improvements with a small number of miniscule regressions, e.g. some icount numbers:
Anyway, overall it's still a perf win (esp. if you focus on primary benchmarks) and it's also as much a cleanup PR as a perf PR, so I think it's good enough. |
Some cleanups and minor perf improvements relating to
TaskDeps
.r? @saethlin