-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Use liballoc's specialised in-place vec collection #97870
Conversation
r? @wesleywiser (rust-highfive has picked a reviewer for you, use r? to override) |
liballoc already specialises in-place vector collection, so manually reimplementing it in `IdFunctor::try_map_id` was superfluous.
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 9208c08 with merge 72423f087b612b625133cd04348ee1bc3d887e43... |
☀️ Try build successful - checks-actions |
Queued 72423f087b612b625133cd04348ee1bc3d887e43 with parent 7425fb2, future comparison URL. |
Finished benchmarking commit (72423f087b612b625133cd04348ee1bc3d887e43): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Footnotes |
Well that's surprising... I'll delve into this over the weekend. |
cachegrind diffs of the relevant regressed benchmarks follow beneath. In each case there has been a significant increase in calls to Primary benchmarksBenchmark | Profile | Scenario | % Change | Significance | | | | Factor
|
All I can imagine here is that some |
It should be since we benchmark try builds on perf.rlo. |
Ping from triage: |
@JohnCSimon thanks for the ping. Honestly, I don't understand the perf regression... I wrote the original code without then appreciating there was a simpler/safer API in stdlib, so this PR was intended just to be a simplifying refactor with no change to behaviour. That it has such a marked perf impact is very strange. If it's unmergeable without the regression being understood/resolved, then I may need some pointers how to proceed? Otherwise I'm happy to close the PR. |
One difference is that the std version isn't |
Let's try another perf run, because those keccak and cranelift-codegen results could just be noise. @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 9208c08 with merge 1b3e7d3fffb286f60775006c81d2c91b2af9cf5d... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (1b3e7d3fffb286f60775006c81d2c91b2af9cf5d): 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.
|
This now looks fine from a performance POV. |
☀️ Test successful - checks-actions |
Finished benchmarking commit (becc24a): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. 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.
CyclesThis benchmark run did not return any relevant results for this metric. |
liballoc already specialises in-place vector collection, so manually
reimplementing it in
IdFunctor::try_map_id
was superfluous.